Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

Breadth-first search is the bulldozer of science. -- Randy Goebel


devel / comp.lang.php / Re: Interaction page with sending images and files.

SubjectAuthor
* Interaction page with sending images and files.Rahaman
`* Re: Interaction page with sending images and files.J.O. Aho
 `- Re: Interaction page with sending images and files.He, who travels time to time

1
Interaction page with sending images and files.

<3e24699c-9f53-4aac-baa2-e0925e9584c8n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.php
X-Received: by 2002:a05:620a:f13:b0:6b5:b956:c1f1 with SMTP id v19-20020a05620a0f1300b006b5b956c1f1mr5499198qkl.691.1657806855180;
Thu, 14 Jul 2022 06:54:15 -0700 (PDT)
X-Received: by 2002:a81:4eca:0:b0:31c:7a6a:f6d3 with SMTP id
c193-20020a814eca000000b0031c7a6af6d3mr10115275ywb.82.1657806853563; Thu, 14
Jul 2022 06:54:13 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.php
Date: Thu, 14 Jul 2022 06:54:13 -0700 (PDT)
Injection-Info: google-groups.googlegroups.com; posting-host=82.131.38.63; posting-account=7cCFPQoAAADFCOgzCH7GAjbyNvI5vWO4
NNTP-Posting-Host: 82.131.38.63
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <3e24699c-9f53-4aac-baa2-e0925e9584c8n@googlegroups.com>
Subject: Interaction page with sending images and files.
From: minaoleneikeegiteine@gmail.com (Rahaman)
Injection-Date: Thu, 14 Jul 2022 13:54:15 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 1556
 by: Rahaman - Thu, 14 Jul 2022 13:54 UTC

Directory: C:\worldnr1chatplace

Mode LastWriteTime Length Name
---- ------------- ------ ----
-a---- 26/04/2022 18:29 6028 data.php
-a---- 26/04/2022 18:29 601 findlastmdate.php
-a---- 26/04/2022 18:29 225 func.php
-a---- 26/04/2022 18:29 1279 ilist.php
-a---- 26/04/2022 18:29 5318 index.php
-a---- 26/04/2022 19:46 15033 index2.php
-a---- 26/04/2022 18:29 414 renewing.php

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);
}

?>

index.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

Re: Interaction page with sending images and files.

<jjaoe9Fdfq2U1@mid.individual.net>

  copy mid

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

  copy link   Newsgroups: comp.lang.php
Path: i2pn2.org!i2pn.org!aioe.org!news.uzoreto.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: user@example.net (J.O. Aho)
Newsgroups: comp.lang.php
Subject: Re: Interaction page with sending images and files.
Date: Thu, 14 Jul 2022 16:44:24 +0200
Lines: 15
Message-ID: <jjaoe9Fdfq2U1@mid.individual.net>
References: <3e24699c-9f53-4aac-baa2-e0925e9584c8n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: individual.net rN694WYNhOo9Xo8WZB8yQAhM3OW86gAgiclAiQs0MQ0deDRC6n
Cancel-Lock: sha1:ET7gdQObo7w/ZumHRU3b/PwXufs=
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101
Thunderbird/91.10.0
Content-Language: en-US-large
In-Reply-To: <3e24699c-9f53-4aac-baa2-e0925e9584c8n@googlegroups.com>
 by: J.O. Aho - Thu, 14 Jul 2022 14:44 UTC

On 14/07/2022 15.54, Rahaman wrote:
> Directory: C:\worldnr1chatplace

No one will look at your code and even less use it,
if you want any kind of reaction on your code, go to
https://github.com/signup?ref_cta=comp.lang.php

Follow instructions and push your code to github.
If you have difficulties to follow the instructions, use your browsers
built in translation functionality and translate it to Estonian.

--

//Aho

Re: Interaction page with sending images and files.

<d4d5006e-8fe5-457c-99bc-fe475d5a5006n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.php
X-Received: by 2002:a37:9785:0:b0:6cf:55d:e554 with SMTP id z127-20020a379785000000b006cf055de554mr2241481qkd.459.1663855963210;
Thu, 22 Sep 2022 07:12:43 -0700 (PDT)
X-Received: by 2002:a81:60c6:0:b0:345:7a55:20ce with SMTP id
u189-20020a8160c6000000b003457a5520cemr3352527ywb.480.1663855962850; Thu, 22
Sep 2022 07:12:42 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.php
Date: Thu, 22 Sep 2022 07:12:42 -0700 (PDT)
In-Reply-To: <jjaoe9Fdfq2U1@mid.individual.net>
Injection-Info: google-groups.googlegroups.com; posting-host=82.131.36.130; posting-account=gin_zAoAAAAxFoHHJeGbYqdKpQ_tFzq7
NNTP-Posting-Host: 82.131.36.130
References: <3e24699c-9f53-4aac-baa2-e0925e9584c8n@googlegroups.com> <jjaoe9Fdfq2U1@mid.individual.net>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <d4d5006e-8fe5-457c-99bc-fe475d5a5006n@googlegroups.com>
Subject: Re: Interaction page with sending images and files.
From: he1983912@aol.com (He, who travels time to time)
Injection-Date: Thu, 22 Sep 2022 14:12:43 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 1873
 by: He, who travels time - Thu, 22 Sep 2022 14:12 UTC

Hey............ Want to talk? Call me.... My telephone number >>>>

(+372) 56330687

J.O. Aho kirjutas Neljapäev, 14. juuli 2022 kl 17:44:34 UTC+3:
> On 14/07/2022 15.54, Rahaman wrote:
> > Directory: C:\worldnr1chatplace
>
> No one will look at your code and even less use it,
> if you want any kind of reaction on your code, go to
> https://github.com/signup?ref_cta=comp.lang.php
>
> Follow instructions and push your code to github.
> If you have difficulties to follow the instructions, use your browsers
> built in translation functionality and translate it to Estonian.
>
> --
>
> //Aho

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor