Jump to content

system_cls.php and Ioncube for sub-directory


Recommended Posts

Hello

 

Have an error message on the installation of a Third party script.

 

Have installed ioncube in the root and the script is in a sub-directory.

 

http://www.interactivebookingsystems.com/classifieds/install.php

 

Any help here please?

 

Warning: main(/home/ibs/public_html/classifieds/adminpanel/system_cls.php) [function.main]: failed to open stream: No such file or directory in /home/ibs/public_html/classifieds/adminpanel/func.php on line 15

 

Warning: main() [function.include]: Failed opening '/home/ibs/public_html/classifieds/adminpanel/system_cls.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/ibs/public_html/classifieds/adminpanel/func.php on line 15

 

func.php

 

<?php

/* $Id: func.php,v 2.0.1 2007-11-25 20:23:22-07 dad Exp dad $ */

// vim: expandtab sw=4 ts=4 sts=4:

########################################################################

## Built2Go PHP Classifieds v2.0                                      ##

## ----------------------------------------------------------------  ##

## Copyright © Big Resources, Inc. All Rights Reserved.              ##

## This software must be used in accordance with its licensing        ##

## terms and conditions at: http://www.built2go.com/faq.php          ##

##                                                                    ##

## This file may not be redistributed in whole or significant part.  ##

## ---------------- BUILT2GO IS NOT FREE SOFTWARE -----------------  ##

########################################################################

error_reporting(E_ALL & ~E_NOTICE);

include_once(FULL_PATH."/adminpanel/system_cls.php");

// ###################### escape string. ###############

function EscapeString($text){

    $text = htmlentities($text, ENT_NOQUOTES, "".CHARSET."");

    if (!get_magic_quotes_gpc()) {

        $text = mysql_real_escape_string($text);

    }

    return $text;

 

}

// ###################### escape string html. ###############

function EscapeStringHtml($text){

 

    if (!get_magic_quotes_gpc() AND !get_magic_quotes_runtime()) {

        $text = mysql_real_escape_string($text);

    }

    return $text;

 

}

//################## checks for valid numbers ##############

function valid_id($id){

  if (preg_match ("/^([0-9]+)$/", $id)){

      return $id;

  } else {

        return '0';

  }

 

}

 

function getVal($a){

$ret='';

    if(!empty($_POST[$a])){

$ret=EscapeString($_POST[$a]);

}

else if(!empty($_GET[$a])){

$ret=EscapeString($_GET[$a]);

}

return $ret;

}

 

//Define function to insert security image

function insertSecurityImage($inputname) {

  $refid = md5(mktime()*rand());

  $insertstr = "<img src=\"securityimage.php?refid=".$refid."\" alt=\"Security Image\" title=\"Security Image\" />\n

  <input type=\"hidden\" name=\"".$inputname."\" value=\"".$refid."\" />";

  return $insertstr;

}

 

//Define function to check security image confirmation

function checkSecurityImage($referenceid, $enteredvalue) {

  $db = new DBM;

    $db->connect();

  $referenceid = EscapeString($referenceid);

  $enteredvalue = EscapeString($enteredvalue);

  $Q = "SELECT ID FROM ".TABLE_PREFIX."security_images  WHERE

  referenceid='$referenceid' AND BINARY hiddentext='$enteredvalue'";

  //echo $Q;

  $db->query($Q);

  if ($db->num_rows()) {

      return true;

  } else {

      return false;

  }

}

function DetectLongString($aboutme){

  $text = explode(" ", $aboutme);

  $totalwords = count($text);

 

    for ($x = 0; $x < $totalwords; $x++) {

        if (strlen($text[$x]) > 150){

            $text[$x] = wordwrap($text[$x], 150, "\r\n",1);

        }

       

    }

    $textnormal = implode(" ", $text);

    return $textnormal;

}

 

function MakeDateSelect($pre,$year,$month,$day,$type,$err,$ary=''){

  global $Months;

    if (!$type){

        $mtime[0] = $year;

        $mtime[1] = $month;

        $mtime[2] = $day;

    } else {

        $mtime = explode("-", $type);

    }

 

    $mdate = "<select name=\"{$pre}year{$ary}\" errortext=\"$err\">\n";

    $mdate .= "                    <option value=\"\">-------</option>\n";

    for($x=2000; $x<2030; $x++){

        $selected = ($mtime[0] == $x)?"selected=\"selected\"":"";

        $mdate .= "                  <option value=\"$x\" $selected>$x</option>\n";

    }

    $mdate .= "                  </select> - \n";

    $mdate .= "                  <select name=\"{$pre}month{$ary}\">\n";

    $mdate .= "                      <option value=\"\">-------</option>\n";

    for ($y=1; $y<13; $y++){

        $j = ($y < 10)?$j = "0$y":$y;

        $selected = ($mtime[1] == $y)?"selected=\"selected\"":"";

 

        $mdate .= "                    <option value=\"$j\" $selected>".date('F', mktime(0,0,0,$j,1,date('Y')))."</option>\n";

    }

    $mdate .= "                    </select> - \n";

    $mdate .= "                    <select name=\"{$pre}day{$ary}\">\n";

    $mdate .= "                        <option value=\"\">-------</option>\n";

    for ($z=01; $z<32; $z++){

        $j = ($z < 10)?$j = "0$z":$z;

        $selected = ($mtime[2] == $z)?"selected=\"selected\"":"";

        $mdate .= "                    <option value=\"$j\" $selected>$z</option>\n";

    }

    $mdate .= "                    </select>";

  return $mdate;

}

 

 

 

// ############# make checkbox #####################

//#################################################

function makeCheckbox($value,$gotvalue,$text="",$extra="", $name,$class){

      $selected = ($value == $gotvalue)?"checked=\"checked\"":"";

      $optiont = ($text != "")?$text:$value;

      $option = "<label class=\"$class\" for=\"$extra\">$optiont<input id=\"$extra\" type=\"checkbox\" value=\"$value\" name=\"$name\" $selected /></label>";

      return $option;

}

//#################################################

function makeInputbox($value,$name,$extra=''){

      $option = " <input type=\"text\" value=\"$value\" name=\"$name\" $extra />\n";

      return $option;

}

 

// ############# make options #####################

//#################################################

function makeOption($value,$gotvalue,$text=""){

      $selected = ($value == $gotvalue)?"selected=\"selected\"":"";

      $option = "<option value=\"$value\" $selected>";

      if ($text){

          $option .= $text."</option>\n";

      } else {

          $option .= $value."</option>\n";

      }

      return $option;

}

 

// ############# make Radio #####################

//#################################################

function makeRadio($value,$gotvalue,$text="",$extra="", $name,$class){

      $selected = ($value == $gotvalue)?"checked=\"checked\"":"";

      $optiont = ($text != "")?$text:$value;

 

      $option = "<label class=\"$class\" for=\"$extra\">$optiont<input id=\"$extra\" type=\"radio\" value=\"$value\" name=\"$name\" $selected /></label>\n";

 

      return $option;

}

 

 

 

function LookupCountry ($id){

    $db = new DBM;

    $db->connect();

    $sql="select printable_name from ".TABLE_PREFIX."country where country_id = '$id'";

    $db->query($sql);

if ($db->num_rows()){

        $rows=$db->_fetch_row('DB_FETCH_ASSOC');

        return $rows['printable_name'];

    }

}

 

 

function SendUserEmail($to, $subject, $mailmsg){

 

    // sends email to users after registration is complete

    global $name_of_site;

    $signupEmail="<html><head></head><body>";

    $signupEmail.= $mailmsg;

    $signupEmail.="</body></html>";

    $header = "From: $name_of_site <".FROM.">\r\nContent-type: text/html\n";

 

if(!mail($to,$subject,$signupEmail, $header)){

echo "Mail Failed";

}

                   

}

 

function ErrorEmail($subject,$postvars,$message){

    global $name_of_site;

    while (list ($key, $value) = each ($postvars)){

        $message .= "[$key] => $value\r\n";

    }

    $message .= "\r\n----Variables sent from Payment Module script----\r\n";

    $header = "From: $name_of_site Payment Module <".FROM.">\r\n";

    mail (FROM,$subject,$message, $header);

 

}

 

function CleanSessionTbl() {

    global $db;

    $db2 = new DBM;

    $db->connect();

    $newsess_time = time() - 3600; //  one hour

    $sql1 ="SELECT lastactivity FROM ".TABLE_PREFIX."session WHERE lastactivity <= '$newsess_time'";

    $db->query($sql1);

    if ($db->num_rows()){

        $db2->connect();

        while ($old=$db->_fetch_row('DB_FETCH_ASSOC')) {

            $sql = "DELETE FROM ".TABLE_PREFIX."session WHERE lastactivity = '".$old['lastactivity']."'";

            $del_session = $db2->query($sql);

        }

        if($del_session){

            @$db->free_result();

            @$db2->free_result();

        }

    }

}

 

function CreateJsString(){

        global $countryid,$ChooseStateProvince;

        $db = new DBM;

    $db->connect();

        $listing =  "

        <!--

          function Fill_Sub1(formf) {

           

          var main_select = document.getElementById(formf).country_id;

          var sub_select = document.getElementById(formf).state_id;

 

          if( main_select.options[main_select.selectedIndex].value == 0 )

          {

            sub_select.length = 0;

          }\n";

          if ($countryid !='' AND $countryid !='0'){

              $selectC = "where country_id = '$countryid'";

          }

          $sql="select country_id, printable_name from ".TABLE_PREFIX."country $selectC";

      $db->query($sql);

            $_db2 = new DBM;

            $_db2->connect();

            while($Row1=$db->_fetch_row('DB_FETCH_ASSOC')){

 

 

          $listing .=  "if(main_select.options[main_select.selectedIndex].value == \"{$Row1[country_id]}\")

        {

 

                sub_select.length = 0;\n";

                $listing .=  "sub_select.options[0] = new Option('$ChooseStateProvince');\n";

                $listing .=  "sub_select.options[0].value = '0';\n";

                $sql2="select s.state_id, s.printable_name from ".TABLE_PREFIX."state s where s.country_id='{$Row1[country_id]}' order by printable_name ";

            $rs2 = $_db2->query($sql2);

            //$selectedctrl=0;

 

                $ctr1 = 1;

        while($Row2=$_db2->_fetch_row('DB_FETCH_ASSOC')){

                    //$listing .=  "alert('$Row2[modelname]');";

                    $listing .=  "sub_select.options[$ctr1] = new Option('{$Row2[printable_name]}');\n";

        $listing .=  "sub_select.options[$ctr1].value = '{$Row2[state_id]}';\n";

                    if($_POST['state_id'] == $Row2['state_id']){

              $selectedctrl3=$ctr1;

              $listing .= "sub_select.options[$selectedctrl3].selected=true;\n";

              } else {

              $selectedctrl3=0;

              }

 

        $ctr1++;

 

                }

 

            $listing .=  "} else \n";

 

 

            }

            $listing .=  " {\n";

            $listing .=  "    sub_select.length = 0;\n";

           

            $listing .= "    sub_select.options[0] = new Option('$ChooseStateProvince');\n";

            $listing .= "    sub_select.options[0].value = '0';\n";

       

            $listing .=  "}\n";

            $listing .=  " }\n";

            $listing .=  "Fill_Sub1('{$_GET['fn']}');

       

        -->\n";

return $listing;

    }

 

function gettotalusers(){

  global $db;

    //$db2 = new DBM;

    $db->connect();

  $username_in = '';

  $datecut=time()-600;

  $db->query("SELECT COUNT(*) AS sessions FROM ".TABLE_PREFIX."session WHERE userid=0 AND lastactivity>{$datecut}");

  $loggedins = $db->_fetch_row('DB_FETCH_ASSOC');

  $numberguest=$loggedins['sessions'];

 

  $numbervisible=0;

  $numberregistered=0;

 

  $db->query("SELECT DISTINCT u.userid,u.id

                              FROM ".TABLE_PREFIX."session s

                              LEFT JOIN ".TABLE_PREFIX."users u

                              ON (u.id=s.userid)

                              WHERE s.userid>0 AND s.lastactivity>$datecut

                              ORDER BY u.userid ASC");

  if ($logged=$db->num_rows()) {

 

    while ($loggedin=$db->_fetch_row('DB_FETCH_ASSOC')) {

      $numberregistered++;

      $id=$loggedin['id'];

      $username_in .= "<a href=\"admin_member.php?do=view&id={$id}\">{$loggedin['userid']}</a>, ";

 

}

  @$db->free_result();

}

 

  $totalonline=$numberregistered+$numberguest;

  $totalusers[] = "There are ($numberregistered) members and ($numberguest) guest online right now.";

  $totalusers[1] = substr($username_in,0, strlen($username_in) -2);

return $totalusers;

}

if (!$GLOBALS['noshutdownfunc']) {

  register_shutdown_function("CleanSessionTbl");

}

if (!file_exists(FULL_PATH."/install.php")){

    $datecut=time()-600;

    $_db = new DBM;

    $_db->connect();

 

    $loggedins = $_db->query_first("SELECT COUNT(*) AS sessions FROM ".TABLE_PREFIX."session WHERE lastactivity>{$datecut}");

    $numberguest=$loggedins['sessions'];

 

    $db = new DBM;

    $SystemInfo = new System($db);

    $SystemInfo->SystemInfo();

    require_once(FULL_PATH."/lang/{$SystemInfo->_systemstatus['LANG_FILE']}/{$SystemInfo->_systemstatus['LANG_FILE']}.php");

    $ClassifiedInfo=new Classifieds($db);

    if (!eregi("upgrade",$_SERVER['PHP_SELF'])){

        if (eregi("billing", $_SERVER['PHP_SELF']) OR eregi("module", $_SERVER['PHP_SELF'])){

            $SiteUrl = SITE_URL."/".SITE_URL_LANG_SSL;

        } else {

            $SiteUrl = SITE_URL."/".SITE_URL_LANG;

        }

        if (!$ClassifiedInfo->VerifySession()){

            eval("\$LoginTbl = \"".$Template->GetTemplate("login")."\";");

        } else {

            $userid = $_SESSION['username'];

            eval("\$LoginTbl = \"".$Template->GetTemplate("loggedin")."\";");

        }

 

        $Categories =& new Ctree($db);

   

 

        $CategoryOptions = '';

        // lets start poll class only for user, not admin

 

      $Categories->cid = (isset($_POST['catid']))?valid_id($_POST['catid']):'';

        $CategoriesList=$Categories->makeTreeList(1);

        if (is_array($CategoriesList)){

            foreach ($CategoriesList AS $sublet_name){

                $CategoryOptions .=$sublet_name;

            }

        }

        if ($SystemInfo->_systemstatus['Tag_Cloud'] == 'A'){

            $Categories->GenerateTagCloud(12,40);

            eval("\$Categories->TagCloud = \"".$Template->GetTemplate("tagcloud")."\";");

        }

    }

 

 

 

}

include_once(FULL_PATH."/global.php");

?>

 

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.