minmod
This commit is contained in:
parent
33e024ae84
commit
9143775f6e
18
automate.php
18
automate.php
|
@ -90,21 +90,3 @@
|
||||||
// Lancement du téléchargement
|
// Lancement du téléchargement
|
||||||
// $req = new ModuleRequest('download/phone', array('subjects'=>[200]));
|
// $req = new ModuleRequest('download/phone', array('subjects'=>[200]));
|
||||||
// $res = $req->download();
|
// $res = $req->download();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// RUN database
|
|
||||||
$db = new lightdb('testdb1');
|
|
||||||
|
|
||||||
var_dump('INSERTING key0 to key99');
|
|
||||||
|
|
||||||
for( $i = 0 ; $i < 100 ; $i++ )
|
|
||||||
echo $db->insert('key'.$i, array('data0_'.$i, 'data1_'.$i)) ? '.' : '_';
|
|
||||||
|
|
||||||
var_dump( $db->filter(array( 0 => 'data0_1' )));
|
|
||||||
|
|
||||||
$db->close();
|
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
class lightdb{
|
class lightdb{
|
||||||
|
|
||||||
// REPERTOIRE RACINE DE TOUTES LES BDD
|
// REPERTOIRE RACINE DE TOUTES LES BDD
|
||||||
public static $root = __ROOT__.'/tmp/';
|
public static $root = __ROOT__.'/src/upload/';
|
||||||
|
|
||||||
// ATTRIBUTS
|
// ATTRIBUTS
|
||||||
private $dbname;
|
private $dbname;
|
||||||
|
|
|
@ -15,33 +15,33 @@
|
||||||
*/
|
*/
|
||||||
private static function readableName($u, $f, $l){
|
private static function readableName($u, $f, $l){
|
||||||
/* (1) On calcule les tailles des chaines */
|
/* (1) On calcule les tailles des chaines */
|
||||||
$ul = strlen($u);
|
$ul = strlen($u);
|
||||||
$fl = strlen($f);
|
$fl = strlen($f);
|
||||||
$ll = strlen($l);
|
$ll = strlen($l);
|
||||||
|
|
||||||
/* (2) Si @username n'est pas vide */
|
/* (2) Si @username n'est pas vide */
|
||||||
if( $ul > 0 ){
|
if( $ul > 0 ){
|
||||||
|
|
||||||
/* (3) Si @username+(@firstname et/ou @lastname) -> username (firstname lastname) */
|
/* (3) Si @username+(@firstname et/ou @lastname) -> username (firstname lastname) */
|
||||||
if( $fl+$ll > 0 )
|
if( $fl+$ll > 0 )
|
||||||
return $u.' ('.trim($f.' '.$l).')';
|
return $u.' ('.trim($f.' '.$l).')';
|
||||||
|
|
||||||
/* (4) Si @username uniquement -> username */
|
/* (4) Si @username uniquement -> username */
|
||||||
else
|
else
|
||||||
return $u;
|
return $u;
|
||||||
|
|
||||||
/* (5) Si pas @username */
|
/* (5) Si pas @username */
|
||||||
}else{
|
}else{
|
||||||
|
|
||||||
/* (6) Si @firstname et/ou @lastname -> firstname lastname*/
|
/* (6) Si @firstname et/ou @lastname -> firstname lastname*/
|
||||||
if( $fl+$ll > 0 )
|
if( $fl+$ll > 0 )
|
||||||
return trim($f.' '.$l);
|
return trim($f.' '.$l);
|
||||||
|
|
||||||
/* (7) Si rien -> Inconnu */
|
/* (7) Si rien -> Inconnu */
|
||||||
else
|
else
|
||||||
return 'Inconnu';
|
return 'Inconnu';
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
100
tmp/testdb1/data
100
tmp/testdb1/data
|
@ -1,100 +0,0 @@
|
||||||
["data0_0","data1_0"]
|
|
||||||
["data0_1","data1_1"]
|
|
||||||
["data0_2","data1_2"]
|
|
||||||
["data0_3","data1_3"]
|
|
||||||
["data0_4","data1_4"]
|
|
||||||
["data0_5","data1_5"]
|
|
||||||
["data0_6","data1_6"]
|
|
||||||
["data0_7","data1_7"]
|
|
||||||
["data0_8","data1_8"]
|
|
||||||
["data0_9","data1_9"]
|
|
||||||
["data0_10","data1_10"]
|
|
||||||
["data0_11","data1_11"]
|
|
||||||
["data0_12","data1_12"]
|
|
||||||
["data0_13","data1_13"]
|
|
||||||
["data0_14","data1_14"]
|
|
||||||
["data0_15","data1_15"]
|
|
||||||
["data0_16","data1_16"]
|
|
||||||
["data0_17","data1_17"]
|
|
||||||
["data0_18","data1_18"]
|
|
||||||
["data0_19","data1_19"]
|
|
||||||
["data0_20","data1_20"]
|
|
||||||
["data0_21","data1_21"]
|
|
||||||
["data0_22","data1_22"]
|
|
||||||
["data0_23","data1_23"]
|
|
||||||
["data0_24","data1_24"]
|
|
||||||
["data0_25","data1_25"]
|
|
||||||
["data0_26","data1_26"]
|
|
||||||
["data0_27","data1_27"]
|
|
||||||
["data0_28","data1_28"]
|
|
||||||
["data0_29","data1_29"]
|
|
||||||
["data0_30","data1_30"]
|
|
||||||
["data0_31","data1_31"]
|
|
||||||
["data0_32","data1_32"]
|
|
||||||
["data0_33","data1_33"]
|
|
||||||
["data0_34","data1_34"]
|
|
||||||
["data0_35","data1_35"]
|
|
||||||
["data0_36","data1_36"]
|
|
||||||
["data0_37","data1_37"]
|
|
||||||
["data0_38","data1_38"]
|
|
||||||
["data0_39","data1_39"]
|
|
||||||
["data0_40","data1_40"]
|
|
||||||
["data0_41","data1_41"]
|
|
||||||
["data0_42","data1_42"]
|
|
||||||
["data0_43","data1_43"]
|
|
||||||
["data0_44","data1_44"]
|
|
||||||
["data0_45","data1_45"]
|
|
||||||
["data0_46","data1_46"]
|
|
||||||
["data0_47","data1_47"]
|
|
||||||
["data0_48","data1_48"]
|
|
||||||
["data0_49","data1_49"]
|
|
||||||
["data0_50","data1_50"]
|
|
||||||
["data0_51","data1_51"]
|
|
||||||
["data0_52","data1_52"]
|
|
||||||
["data0_53","data1_53"]
|
|
||||||
["data0_54","data1_54"]
|
|
||||||
["data0_55","data1_55"]
|
|
||||||
["data0_56","data1_56"]
|
|
||||||
["data0_57","data1_57"]
|
|
||||||
["data0_58","data1_58"]
|
|
||||||
["data0_59","data1_59"]
|
|
||||||
["data0_60","data1_60"]
|
|
||||||
["data0_61","data1_61"]
|
|
||||||
["data0_62","data1_62"]
|
|
||||||
["data0_63","data1_63"]
|
|
||||||
["data0_64","data1_64"]
|
|
||||||
["data0_65","data1_65"]
|
|
||||||
["data0_66","data1_66"]
|
|
||||||
["data0_67","data1_67"]
|
|
||||||
["data0_68","data1_68"]
|
|
||||||
["data0_69","data1_69"]
|
|
||||||
["data0_70","data1_70"]
|
|
||||||
["data0_71","data1_71"]
|
|
||||||
["data0_72","data1_72"]
|
|
||||||
["data0_73","data1_73"]
|
|
||||||
["data0_74","data1_74"]
|
|
||||||
["data0_75","data1_75"]
|
|
||||||
["data0_76","data1_76"]
|
|
||||||
["data0_77","data1_77"]
|
|
||||||
["data0_78","data1_78"]
|
|
||||||
["data0_79","data1_79"]
|
|
||||||
["data0_80","data1_80"]
|
|
||||||
["data0_81","data1_81"]
|
|
||||||
["data0_82","data1_82"]
|
|
||||||
["data0_83","data1_83"]
|
|
||||||
["data0_84","data1_84"]
|
|
||||||
["data0_85","data1_85"]
|
|
||||||
["data0_86","data1_86"]
|
|
||||||
["data0_87","data1_87"]
|
|
||||||
["data0_88","data1_88"]
|
|
||||||
["data0_89","data1_89"]
|
|
||||||
["data0_90","data1_90"]
|
|
||||||
["data0_91","data1_91"]
|
|
||||||
["data0_92","data1_92"]
|
|
||||||
["data0_93","data1_93"]
|
|
||||||
["data0_94","data1_94"]
|
|
||||||
["data0_95","data1_95"]
|
|
||||||
["data0_96","data1_96"]
|
|
||||||
["data0_97","data1_97"]
|
|
||||||
["data0_98","data1_98"]
|
|
||||||
["data0_99","data1_99"]
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue