function update_student($argv) { if (isset($argv[2]) && preg_match_all("/[a-z]{6}_[a-z0-9]/", $argv[2], $array)) { echo "What do you want to update? \n> "; $str = readLine(); $up = verif_update($str); if ($up != 0) { $connect = new MongoClient(); $db = $connect->db_etna; $collection = $db->students; $newdata = array('$set' => array($str => $up)); $collection->update(array("login" => $argv[2]), $newdata); echo "User informations modified !"; } } else { echo "Login incorrect !\n"; } }
$meta["title"] = $_GET['admin']; $meta['favicon'] = uicon('screen_4to3_16', 'picol/16'); } elseif ($_GET["msql"]) { $meta["title"] = $_GET['msql']; $meta['favicon'] = uicon('database_16', 'picol/16'); } elseif ($_SESSION["read"]) { $meta["title"] = $_SESSION["raed"]; $meta["descript"] = $_SESSION["descript"]; $meta["img"] = $host . '/imgc/' . $_SESSION["imgrel"]; } else { $meta["title"] = $_SESSION['mn'][$_SESSION['qb']]; $meta["descript"] = $_SESSION['qbin']["dscrp"]; } //$meta["img"]=host().'/img/ban_'.$_SESSION['qb'].'.jpg'; $cst = $_SESSION['desgn'] ? '?' . randid() : ''; if ($_SESSION['mobile'] && rstr(63)) { $_SESSION['negcss'] = 1; } $meta['css'] = define_design(); verif_update(); //update if ($_SESSION['dlnb']) { Head::add('jscode', sj('popup_update')); } if ($_POST['flow'] or rstr(39)) { $flow = 1; } #back_in_time if (abs(ses('dayx') - ses('daya')) > 86400) { $_POST['popadm']['timetravel'] = lkc('txtyl', '/reload/' . ses('qb'), nms(82)); }