home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.programming      Programming issues that transcend langua      57,431 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 55,755 of 57,431   
   Kristjan Robam to All   
   New type of chat portal made with PHP. (   
   06 May 22 21:06:22   
   
   From: ya3891921@gmail.com   
      
   C:\worldnr1chatplace>dir   
    Volume in drive C is Windows   
    Volume Serial Number is 4426-E98E   
      
    Directory of C:\worldnr1chatplace   
      
   26/04/2022  18:29              .   
   26/04/2022  18:29             6,028 data.php   
   26/04/2022  18:29               601 findlastmdate.php   
   26/04/2022  18:29               225 func.php   
   26/04/2022  18:29             1,279 ilist.php   
   26/04/2022  18:29             5,318 index.php   
   26/04/2022  19:46            15,033 index2.php   
   26/04/2022  18:29               414 renewing.php   
                  7 File(s)         28,898 bytes   
                  1 Dir(s)  187,245,793,280 bytes free   
      
   C:\worldnr1chatplace>type *.*   
      
   data.php   
      
      
   dtables=$dtables;   
   }   
      
   function deleteotable($otabname) {   
   if (file_exists($otabname.".dat")) {   
   unlink($otabname.".dat");   
   }   
   $this->loadobjecttables();   
   }   
      
   function insertobject($obj) {   
   $this->loadobjecttables();   
   $oclass=$obj->getNameOfClass();   
   $tabls=$this->dtables;   
   $oarridx=-1;   
   for($i=0; $igetNameOfClass()==$oclass) {   
   $oarridx=$i;   
   }   
   }   
   if($oarridx==-1) return false;   
   $tabls[$oarridx][]=$obj;   
   unlink($oclass.".dat");   
   $b=serialize($tabls[$oarridx]);   
   $fh = fopen($oclass.".dat", "a");   
   fwrite($fh, $b);   
   fclose($fh);   
   chmod($oclass.".dat", 0700);   
   }   
      
      
   function saveobjecttables() {   
   $tabls=$this->dtables;   
   for($i=0; $igetNameOfClass();   
   if (file_exists($oc.".dat")) {   
   unlink($oc.".dat");   
   }   
   $b=serialize($tabls[$i]);   
   $fh = fopen($oc.".dat", "a");   
   fwrite($fh, $b);   
   fclose($fh);   
   chmod($oc.".dat", 0700);   
   }   
   return true;   
   }   
      
   function saveobjecttable($objcl) {   
   $tabls=$this->dtables;   
   $obclindex=-1;   
   for($i=0; $igetNameOfClass()==$objcl) {   
   $obclindex=$i;   
   break;   
   }   
   }   
   if (file_exists($objcl.".dat")) {   
   unlink($objcl.".dat");   
   }   
   $b=serialize($tabls[$obclindex]);   
   $fh = fopen($objcl.".dat", "a");   
   fwrite($fh, $b);   
   fclose($fh);   
   chmod($objcl.".dat", 0700);   
   return true;   
   }   
      
   function makearrayunique($array){   
   $duplicate_keys = array();   
   $tmp = array();   
      
   foreach ($array as $key => $val){   
   if (is_object($val))   
   $val = (array)$val;   
      
   if (!in_array($val, $tmp))   
   $tmp[] = $val;   
   else $duplicate_keys[] = $key;   
   }   
      
   foreach ($duplicate_keys as $key)   
   unset($array[$key]);   
   return $array;   
   }   
      
   function deleteduplicates() {   
   $ob=$this->dtables;   
   for($i=0; $imakearrayunique($ob[$i]);   
   $ob[$i]=$o12;   
   }   
   $this->saveobjecttables();   
   }   
      
   function deleteduplicatescl($objcl) {   
   $ob=$this->dtables;   
   $obclindex=-1;   
   for($i=0; $igetNameOfClass()==$objcl) {   
   $obclindex=$i;   
   break;   
   }   
   }   
   $o12=$this->makearrayunique($ob[$obclindex]);   
   $ob[$obclindex]=$o12;   
   $this->dtables=$ob;   
   $this->saveobjecttable($objcl);   
   }   
      
      
      
   function objectClassestoarray($objectA,   
   $objectB) {   
   $new_object = array();   
      
   foreach($objectA as $property => $value) {   
   $new_object[$property]=$value;   
   }   
      
   foreach($objectB as $property => $value) {   
   $new_object[$property]=$value;   
   }   
      
   return $new_object;   
   }   
      
      
   function query($query) {   
   $this->loadobjecttables();   
   $ovars=array();   
   $objects=$this->dtables;   
   for($i=0; $igetNameOfClass())) continue;   
   if(preg_match("/^get \* from ".$objects[$i][0]->getNameOfClass()   
   ";$/",$query)) {   
   $objectsList = [];   
   foreach ($objects[$i] as $obj) {   
   $objectsList[] = (array)$obj;   
   }   
   return $objectsList;   
   $exitf=true;   
   }   
   }   
   }   
      
   for($i=0; $igetNameOfClass())) continue;   
   if(preg_match("/^get ".$ovars[$i][$j]." from ".$objects[$i][0]->   
   etNameOfClass().";$/",$query)) {   
   return array_column($objects[$i], $ovars[$i][$j]);   
   $exitf=true;   
   }   
   }   
   }   
      
   $outp=array();   
   for($i=0; $igetNameOfClass())) continue;   
   if(!class_exists($objects[$k][0]->getNameOfClass())) continue;   
      
   if(preg_match("/^get \* from ".$objects[$i][0]->getNameOfClass()." join   
   ".$objects[$k][0]->getNameOfClass().   
   " on \(".$objects[$i][0]->getNameOfClass()."\.".$ovars[$i][$j]."   
   =".$objects[$k][0]->getNameOfClass().   
   "\.".$ovars[$k][$l]."\);$/",$query)) {   
   for($ii=0; $ii{$ovars[$i][$j]}==$objects[$k][$ii2]->{$ovars[$k][$l]}) {   
   $oobj = $this->objectClassestoarray($objects[$i][$ii], $objects[$k][$ii2]);   
   $outp[]=$oobj;   
   }   
   }   
   }   
   $exitf=true;   
   }   
   }   
   }   
   }   
   }   
      
   for($k=0; $kgetNameOfClass()))   
   continue;   
      
   if(preg_match("/^get \* from ".$objects[$k][0]->getNameOfClass()." where   
   ".$ovars[$k][$l]."\=(.*) and ".$ovars[$k][$l2]."\=(.*);$/",$query, $matches)) {   
   for($ii2=0;   
   $ii2{$ovars[$k][$l]}==$matches[1]&&$objects[$   
   ][$ii2]->{$ovars[$k][$l2]}==$matches[2]) {   
      
   $oobj = (array)$objects[$k][$ii2];   
      
   $outp[]=$oobj;   
   }   
   }   
   $exitf=true;   
   }   
   }   
   }   
   }   
      
      
   for($k=0; $kgetNameOfClass())) continue;   
   if(preg_match("/^get \* from ".$objects[$k][0]->getNameOfClass()." where   
   ".$ovars[$k][$l]."\=(.*);$/",$query, $matches)) {   
   for($ii2=0; $ii2{$ovars[$k][$l]}==$matches[1]) {   
   $oobj = (array)$objects[$k][$ii2];   
   $outp[]=$oobj;   
   }   
   }   
   $exitf=true;   
   }   
   }   
   }   
      
   if(count($outp)>0) {   
   return $outp;   
   }   
      
      
   return $mches;   
   }   
      
   }   
      
   ?>   
      
   findlastmdate.php   
      
      
   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca