Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

Elliptic paraboloids for sale.


devel / comp.lang.php / Messaging place with mini pictures and with sending files and pictures.

SubjectAuthor
o Messaging place with mini pictures and with sending files and pictures.Programmeeerija

1
Messaging place with mini pictures and with sending files and pictures.

<f97c5d72-3d97-447f-a961-1024f198bfc4n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=554&group=comp.lang.php#554

  copy link   Newsgroups: comp.lang.php
X-Received: by 2002:a5d:5234:0:b0:21b:829c:3058 with SMTP id i20-20020a5d5234000000b0021b829c3058mr3555076wra.13.1656159042332;
Sat, 25 Jun 2022 05:10:42 -0700 (PDT)
X-Received: by 2002:a81:68d7:0:b0:318:11df:a40d with SMTP id
d206-20020a8168d7000000b0031811dfa40dmr4180397ywc.196.1656159041534; Sat, 25
Jun 2022 05:10:41 -0700 (PDT)
Path: i2pn2.org!i2pn.org!aioe.org!news.uzoreto.com!feeder1.cambriumusenet.nl!feed.tweak.nl!209.85.128.87.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.php
Date: Sat, 25 Jun 2022 05:10:41 -0700 (PDT)
Injection-Info: google-groups.googlegroups.com; posting-host=82.131.36.199; posting-account=_HrVLgoAAAAvDDvVYw-sidhilgYzxTuh
NNTP-Posting-Host: 82.131.36.199
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <f97c5d72-3d97-447f-a961-1024f198bfc4n@googlegroups.com>
Subject: Messaging place with mini pictures and with sending files and pictures.
From: ingel1983912@gmail.com (Programmeeerija)
Injection-Date: Sat, 25 Jun 2022 12:10:42 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: Programmeeerija - Sat, 25 Jun 2022 12:10 UTC

C:\worldnr1chatplace>dir
Volume in drive C is Windows
Volume Serial Number is 4426-E98E

Directory of C:\worldnr1chatplace

26/04/2022 18:29 <DIR> .
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

<?php

class Dobj {
function getNameOfClass()
{ return static::class;
} }

class Data {

var $dtables;

function gettime() {
return date("d.m.Y H:i:s");
}

function loadobjecttables() {
$dtables = array();
foreach (glob("*.dat") as $file) {
$path_parts = pathinfo($file);
if(!class_exists($path_parts['filename'])) {
continue;
} $file1 = file_get_contents($file, true);
$dtables[] = unserialize($file1);
} $this->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; $i<count($tabls); $i++) {
if($tabls[$i][0]->getNameOfClass()==$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; $i<count($tabls); $i++) {
$oc=$tabls[$i][0]->getNameOfClass();
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; $i<count($tabls); $i++) {
if($tabls[$i][0]->getNameOfClass()==$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; $i<count($ob); $i++) {
$o12=$this->makearrayunique($ob[$i]);
$ob[$i]=$o12;
} $this->saveobjecttables();
}

function deleteduplicatescl($objcl) {
$ob=$this->dtables;
$obclindex=-1;
for($i=0; $i<count($ob); $i++) {
if($ob[$i][0]->getNameOfClass()==$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; $i<count($objects); $i++) {
$ovars[]=array_keys(get_object_vars($objects[$i][0]));
} $mches=array();
$results=null;
$exitf=false;

for($i=0; $i<count($objects); $i++) {
if($exitf) break;
for($j=0; $j<count($ovars); $j++) {
if($exitf) break;
if(!class_exists($objects[$i][0]->getNameOfClass())) 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; $i<count($objects); $i++) {
if($exitf) break;
for($j=0; $j<count($ovars); $j++) {
if($exitf) break;
if(!class_exists($objects[$i][0]->getNameOfClass())) continue;
if(preg_match("/^get ".$ovars[$i][$j]." from ".$objects[$i][0]->getNameOfClass().";$/",$query)) {
return array_column($objects[$i], $ovars[$i][$j]);
$exitf=true;
} }
}

$outp=array();
for($i=0; $i<count($objects); $i++) {
if($exitf) break;
for($j=0; $j<count($ovars[$i]); $j++) {
if($exitf) break;
for($k=0; $k<count($objects); $k++) {
if($exitf) break;
for($l=0; $l<count($ovars[$k]); $l++) {
if($exitf) break;
if(!class_exists($objects[$i][0]->getNameOfClass())) 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<count($objects[$i]); $ii++) {
for($ii2=0; $ii2<count($objects[$k]);$ii2++) {
if($objects[$i][$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; $k<count($objects); $k++) {
if($exitf) break;
for($l=0; $l<count($ovars[$k]); $l++) {
if($exitf) break;
for($l2=0; $l2<count($ovars[$k]); $l2++) {
if($exitf) break;
if(!class_exists($objects[$k][0]->getNameOfClass()))
continue;

if(preg_match("/^get \* from ".$objects[$k][0]->getNameOfClass()." where ".$ovars[$k][$l]."\=(.*) and ".$ovars[$k][$l2]."\=(.*);$/",$query, $matches)) {
for($ii2=0;
$ii2<count($objects[$k]); $ii2++) {

if($objects[$k][$ii2]->{$ovars[$k][$l]}==$matches[1]&&$objects[$k][$ii2]->{$ovars[$k][$l2]}==$matches[2]) {

$oobj = (array)$objects[$k][$ii2];

$outp[]=$oobj;
} }
$exitf=true;
} }
} }

for($k=0; $k<count($objects); $k++) {
if($exitf) break;
for($l=0; $l<count($ovars[$k]); $l++) {
if($exitf) break;
if(!class_exists($objects[$k][0]->getNameOfClass())) continue;
if(preg_match("/^get \* from ".$objects[$k][0]->getNameOfClass()." where ".$ovars[$k][$l]."\=(.*);$/",$query, $matches)) {
for($ii2=0; $ii2<count($objects[$k]); $ii2++) {
if($objects[$k][$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

<?php

include("../data.php");

class Msg extends Dbobj{
var $text;
}

$myd=new Data();

$myd->loadobjecttables();
$texists=false;
$t1=$myd->dtables;

$mdates=array();

for($i=0; $i<count($t1);$i++) {
if($t1[$i][0]->getNameOfClass()=="Msg") {
$texists=true;
break;
} }

if($texists==true) {
$t2=$mydb->query("get text from Msg;");
for($i=0; $i<count($t2);$i++) {
$date12=date("d.m.Y H:i:s", strtotime(substr($t2[$i], 0, 19)));
$d_start = new DateTime($date12);
$mdates[]=$d_start;
} echo $mdates[count($mdates)-1]->format('d.m.Y H:i:s');;
} else {
echo "";
}

?>

func.php

<?php

function rrmdir($dir) {
$files = array_diff(scandir($dir), array('.','..'));
foreach ($files as $file) {
(is_dir("$dir/$file")) ? rrmdir("$dir/$file") : unlink("$dir/$file");
} return rmdir($dir);
}

?>

ilist.php

<?php

include("../data.php");

class Msg extends Dobj{
var $text;
}

class Inimene extends Dobj{
var $name;
var $time;
var $dpic;
}

$myd=new Data();

$myd->loadobjecttables();
$texists=false;
$t1=$myd->dtables;

$ilist=array();

$itidx=-1;
for($i=0; $i<count($t1);$i++) {
if($t1[$i][0]->getNameOfClass()=="Inimene") {
$texists=true;
$itidx=$i;
break;
} }

$newi=array();

if($itidx>-1) {
for($i=0; $i<count($t1[$itidx]);$i++) {
$date12=date("d.m.Y H:i:s", strtotime($t1[$itidx][$i]->time));
$dtime = new DateTime($date12);

$datenow=date( 'd.m.Y H:i:s', strtotime( '+3 hour' , strtotime("now") ));
$dtimenow = new DateTime($datenow);

$diff = $dtimenow->getTimestamp() - $dtime->getTimestamp();
if($diff<60*15) {
$newi[]=$t1[$itidx][$i];
} else {
}
Click here to read the complete article

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor