Best Phoronix-test-suite code snippet using show_result.run
mdb.php
Source:mdb.php
...42}43function mdb_get($cmd_name,$WAN1,$WLAN1)44{45 $mydlink_path = "/mydlink";46 $run_mdb_path = "/runtime/mydlink/mdb";47 if($cmd_name == "fw_version") {show_result(UrlEncode(query("/runtime/device/firmwareversion")));}48 else if($cmd_name == "hw_version") {show_result(UrlEncode(query("/runtime/device/hardwareversion")));}49 else if($cmd_name == "dev_model") {show_result(UrlEncode(query("/runtime/device/modelname")));}50 else if($cmd_name == "dev_name") {show_result(UrlEncode(query("/device/gw_name")));}51 else if($cmd_name == "admin_passwd")52 {53 $found = 0;54 $cnt = query("/device/account/count");55 foreach("/device/account/entry")56 {57 if ($InDeX > $cnt) break;58 $name = query("name");59 if(tolower($name) == "admin")60 {61 show_result(UrlEncode(query("password")));62 $found = 1;63 break;64 }65 }66 if($found != 1) {return error("1");}67 }68 else if($cmd_name == "http_port")69 {70 /*this is mean mydlink agent which port to connect api on loopback.*/71 $http_port="80";72 show_result($http_port);73 }74 else if($cmd_name == "sp_http_port")75 {76 $sp_http_port=query("/webaccess/httpport");77 if($sp_http_port == "") {$sp_http_port="8181";}78 show_result($sp_http_port);79 }80 else if($cmd_name == "sp_https_port")81 {82 $sp_https_port=query("/webaccess/httpsport");83 if($sp_https_port == "") {$sp_https_port="4433";}84 show_result($sp_https_port);85 }86 else if($cmd_name == "https_port")87 {88 /*this is mean mydlink agent which port to connect api on loopback.*/89 $https_port="443";90 show_result($https_port);91 }92 else if($cmd_name == "register_st")93 {94 $reg_status = query($mydlink_path."/register_st");95 if($reg_status == "") {$reg_status=0;}96 show_result($reg_status);97 }98 else if($cmd_name == "mac_addr")99 {100 $mac_addr = query("/runtime/devdata/lanmac");101 $mac_fmt = cut($mac_addr,0,":").cut($mac_addr,1,":").cut($mac_addr,2,":").102 cut($mac_addr,3,":").cut($mac_addr,4,":").cut($mac_addr,5,":");103 show_result(toupper($mac_fmt));104 }105 else if(strstr($cmd_name,"attr_") != "")106 {107 show_result(query($mydlink_path."/".$cmd_name));108 }109 else if($cmd_name == "wan_mode")110 {111 $path_inf_wan1 = XNODE_getpathbytarget("", "inf", "uid", $WAN1, 0);112 $wan1_inet = query($path_inf_wan1."/inet");113 $path_wan1_inet = XNODE_getpathbytarget("/inet", "entry", "uid", $wan1_inet, 0);114 $wan_mode = query($path_wan1_inet."/ipv4/static");115 show_result($wan_mode);116 }117 else if($cmd_name == "static_ip_info")118 {119 $static_ip_info = "";120 $path_inf_wan1 = XNODE_getpathbytarget("", "inf", "uid", $WAN1, 0);121 $wan1_inet = query($path_inf_wan1."/inet");122 $path_wan1_inet = XNODE_getpathbytarget("/inet", "entry", "uid", $wan1_inet, 0);123 $is_static = query($path_wan1_inet."/ipv4/static");124 if($is_static == "1")125 {126 $mask = "";127 anchor($path_wan1_inet."/ipv4");128 if(query("mask") != "") {$mask = ipv4int2mask(query("mask"));}129 $static_ip_info = "I=".query("ipaddr")."&N=".$mask."&G=".query("gateway").130 "&D1=".query("dns/entry:1")."&D2=".query("dns/entry:2");131 }132 show_result($static_ip_info);133 }134 else if($cmd_name == "eth_cable_st")135 {136 $path_inf_wan1 = XNODE_getpathbytarget("", "inf", "uid", $WAN1, 0);137 $wan1_phyuid = query($path_inf_wan1."/phyinf");138 $path_rwan1_phy = XNODE_getpathbytarget("/runtime", "phyinf", "uid", $wan1_phyuid, 0);139 $linkstatus = query($path_rwan1_phy."/linkstatus");140 $eth_cable_st = 0;141 if($linkstatus != "0" && $linkstatus != "") {$eth_cable_st = 1;}142 show_result($eth_cable_st);143 }144 else if($cmd_name == "wlan_conn_st")145 {146 // TODO function 147 // For now, we always return 0.148 $wlan_conn_st = 0;149 show_result($wlan_conn_st);150 }151 else if($cmd_name == "cur_ip_info")152 {153 $path_rwan1_inf = XNODE_getpathbytarget("/runtime", "inf", "uid", $WAN1, 0);154 anchor($path_rwan1_inf."/inet/ipv4");155 $cur_ip_info = "";156 $mask = "";157 if(query("mask") != "") {$mask = ipv4int2mask(query("mask"));}158 $cur_ip_info = "I=".query("ipaddr")."&N=".$mask."&G=".query("gateway").159 "&D1=".query("dns:1")."&D2=".query("dns:2");160 show_result($cur_ip_info);161 }162 else if($cmd_name == "pppoe_info")163 {164 $path_inf_wan1 = XNODE_getpathbytarget("", "inf", "uid", $WAN1, 0);165 $wan1_inet = query($path_inf_wan1."/inet");166 $path_inet_wan1 = XNODE_getpathbytarget("/inet", "entry", "uid", $wan1_inet, 0);167 anchor($path_inet_wan1);168 $addrtype = query("addrtype");169 $over = query("ppp4/over");170 if($addrtype == "ppp4" && $over == "eth") {$pppoe_enable = "1";}171 else {$pppoe_enable = "0";}172 $username = UrlEncode(query("ppp4/username"));173 $password = UrlEncode(query("ppp4/password"));174 $pppoe_info = "E=".$pppoe_enable."&U=".$username."&P=".$password;175 show_result($pppoe_info); 176 }177 else if($cmd_name == "wlan_st_info")178 {179 $path_phyinf_wlan1 = XNODE_getpathbytarget("", "phyinf", "uid", $WLAN1, 0);180 $wlan_st_info = query($path_phyinf_wlan1."/active");181 if($wlan_st_info == "") {$wlan_st_info = 0;}182 show_result($wlan_st_info);183 }184 else if($cmd_name == "wlan_info")185 {186 $path_phyinf_wlan1 = XNODE_getpathbytarget("", "phyinf", "uid", $WLAN1, 0);187 $path_wifi_wlan1 = XNODE_getpathbytarget("/wifi", "entry", "uid", query($path_phyinf_wlan1."/wifi"), 0);188 anchor($path_wifi_wlan1);189 $op_mode = query($mydlink_path."/wifi/op_mode");190 if($op_mode == "") {$op_mode=0;}191 $ssid = UrlEncode(query("ssid"));192 $str_auth = query("authtype");193 $str_encrypt = query("encrtype");194 if($str_auth == "OPEN" && $str_encrypt == "NONE") {$security_type = 0;}195 else if($str_auth == "OPEN" && $str_encrypt == "WEP") {$security_type = 1;}196 else if($str_auth == "SHARED" && $str_encrypt == "WEP") {$security_type = 2;}197 else if($str_auth == "WPAPSK") {$security_type = 3;}198 else if($str_auth == "WPA2PSK") {$security_type = 4;}199 else if($str_auth == "WPA+2PSK") {$security_type = 5;}200 else {$security_type = 0;}201 202 if($str_encrypt == "WEP")203 {204 if(query("nwkey/wep/size") == 64) {$encrypt_type = 0;}205 else {$encrypt_type = 1;} 206 }207 else if($str_encrypt == "AES") {$encrypt_type = 2;}208 else if($str_encrypt == "TKIP") {$encrypt_type = 3;}209 else if($str_encrypt == "TKIP+AES") {$encrypt_type = 4;}210 else {$encrypt_type = 0;}211 212 if($str_encrypt == "WEP") {$key = UrlEncode(query("nwkey/wep/key:1"));}213 else if(strstr($str_auth,"PSK") != "") {$key = UrlEncode(query("nwkey/psk/key"));}214 215 $wlan_info = "M=".$op_mode."&I=".$ssid."&S=".$security_type."&E=".$encrypt_type."&K=".$key;216 show_result($wlan_info);217 }218 else if($cmd_name == "wlan_ap_list")219 {220 $SiteSurveyPath = "/runtime/wifi_tmpnode/sitesurvey";221 $wlan_ap_list = "";222 foreach($SiteSurveyPath."/entry")223 {224 if($InDeX > 1) {$wlan_ap_list = $wlan_ap_list.";";}225 anchor($SiteSurveyPath."/entry:".$InDeX);226 $ssid = UrlEncode(query("ssid"));227 $op_mode = 0; // For now, always 0.228 $channel = query("channel");229 if($channel == "" || $channel < 0) {$channel=0;}230 $str_auth = query("authtype");231 $str_encrypt = query("encrtype");232 $signal = query("rssi");233 if($signal == "" || $signal < 0) {$signal=0;}234 235 if($str_auth == "OPEN" && $str_encrypt == "NONE") {$security_type = 0;}236 else if($str_encrypt == "WEP")237 {238 if($str_auth == "WEPAUTO" || $str_auth == "OPEN") {$security_type = 1;} //Mydlink doesn't define this type. We temporarily see it as WEP OPEN.239 else if($str_auth == "SHARED") {$security_type = 2;}240 else {$security_type = 0;}241 }242 else if($str_auth == "WPAPSK") {$security_type = 3;}243 else if($str_auth == "WPA2PSK") {$security_type = 4;}244 else if($str_auth == "WPA+2PSK") {$security_type = 5;}245 else {$security_type = 0;}246 247 if($str_encrypt == "WEP")248 {249 //We couldn't get the WEP key size, so we can't tell whether it's WEP-64bit or WEP-128bit.250 //For now, we use WEP-64bit as default.251 $encrypt_type = 0;252 }253 else if($str_encrypt == "AES") {$encrypt_type = 2;}254 else if($str_encrypt == "TKIP") {$encrypt_type = 3;}255 else if($str_encrypt == "TKIP+AES") {$encrypt_type = 4;}256 else {$encrypt_type = 0;}257 $wlan_ap_list = $wlan_ap_list."I=".$ssid."&M=".$op_mode."&C=".$channel."&S=".258 $security_type."&E=".$encrypt_type."&P=".$signal;259 }260 if($wlan_ap_list == "") {$wlan_ap_list = "I=&M=0&C=0&S=0&E=0&P=0";}261 show_result($wlan_ap_list);262 }263 else if($cmd_name == "mdb_st")264 {265 $mdb_set = query($run_mdb_path."/".$cmd_name);266 if($mdb_set == "") {$mdb_set = 1;}267 show_result($mdb_set);268 }269 else {return error("1");}270 271 return 0;272}273function mdb_set($cmd_name,$arg)274{275 $run_mdb_path = "/runtime/mydlink/mdb";276 $mdb_tmp_path = $run_mdb_path."/tmp";277 $ret = "0";278 set($run_mdb_path."/mdb_st",0);279 if($cmd_name != "")280 {281 if($cmd_name == "admin_passwd")282 {283 if (strlen($arg) < 6 || strlen($arg) > 32)284 {285 $ret = "1";286 }287 }288 $found = 0;289 $mdb_tmp_cnt = query($mdb_tmp_path."/entry#");290 if($mdb_tmp_cnt == "") $mdb_tmp_cnt = 0;291 foreach($mdb_tmp_path."/entry")292 {293 if ($InDeX > $mdb_tmp_cnt) break;294 $name = query("name");295 if($name == $cmd_name)296 {297 $found = 1;298 set("value",$arg);299 set("ret",$ret);300 break;301 }302 }303 304 if($found == 0)305 {306 $next_ID = $mdb_tmp_cnt+1;307 set($mdb_tmp_path."/entry:".$next_ID."/name",$cmd_name);308 set($mdb_tmp_path."/entry:".$next_ID."/value",$arg);309 set($mdb_tmp_path."/entry:".$next_ID."/ret",$ret);310 }311 }312 if ($ret == "0")313 show_result($arg);314 set($run_mdb_path."/mdb_st",1);315 return 0;316}317 318function mdb_apply($WAN1,$WLAN1)319{320 $mydlink_path = "/mydlink";321 $run_mdb_path = "/runtime/mydlink/mdb";322 $mdb_tmp_path = $run_mdb_path."/tmp";323 324 $servicecmd="";325 $dbsave=0;326 $mdb_tmp_cnt = query($mdb_tmp_path."/entry#");327 if($mdb_tmp_cnt == "") {$mdb_tmp_cnt = 0;}328 foreach($mdb_tmp_path."/entry")329 {330 if ($InDeX > $mdb_tmp_cnt) break;331 $cmd_ret = query("ret");332 if ($cmd_ret != "0") continue;333 $cmd_name = query("name");334 $cmd_value = query("value");335 336 if($cmd_name == "admin_passwd")337 {338 $cnt = query("/device/account/count");339 foreach("/device/account/entry")340 {341 if ($InDeX > $cnt) break;342 $name = query("name");343 if(tolower($name) == "admin")344 {345 set("password",$cmd_value);346 $servicecmd = service_add($servicecmd,"DEVICE.ACCOUNT","restart");347 $dbsave = 1;348 break;349 }350 }351 }352 else if($cmd_name == "register_st")353 {354 set($mydlink_path."/register_st",$cmd_value);355 $dbsave = 1;356 }357 else if(strstr($cmd_name,"attr_") != "")358 {359 set($mydlink_path."/".$cmd_name,$cmd_value);360 $dbsave = 1;361 }362 else if($cmd_name == "wan_mode")363 {364 $path_inf_wan1 = XNODE_getpathbytarget("", "inf", "uid", $WAN1, 0);365 $wan1_inet = query($path_inf_wan1."/inet");366 $path_inet_wan1 = XNODE_getpathbytarget("/inet", "entry", "uid", $wan1_inet, 0);367 set($path_inet_wan1."/ipv4/static",$cmd_value);368 $servicecmd = service_add($servicecmd,"WAN","restart");369 $dbsave = 1;370 }371 else if($cmd_name == "static_ip_info")372 {373 $path_inf_wan1 = XNODE_getpathbytarget("", "inf", "uid", $WAN1, 0);374 $wan1_inet = query($path_inf_wan1."/inet");375 $path_inet_wan1 = XNODE_getpathbytarget("/inet", "entry", "uid", $wan1_inet, 0);376 anchor($path_inet_wan1."/ipv4");377 $delimiter1 = "&";378 $delimiter2 = "=";379 $cnt = cut_count($cmd_value, $delimiter1);380 $i = 0;381 while ($i < $cnt)382 {383 $token = cut($cmd_value, $i, $delimiter1);384 if (charcodeat($token,0) == "I") //IP address385 {386 $Value = cut($token, 1, $delimiter2);387 set("ipaddr",$Value);388 }389 else if (charcodeat($token,0) == "N") //Netmask390 {391 $Value = cut($token, 1, $delimiter2);392 set("mask",ipv4mask2int($Value));393 }394 else if (charcodeat($token,0) == "G") //Gateway395 {396 $Value = cut($token, 1, $delimiter2);397 set("gateway",$Value);398 }399 else if (charcodeat($token,0) == "D" && charcodeat($token,1) == "1") //1st DNS400 {401 $Value = cut($token, 1, $delimiter2);402 set("dns/entry:1",$Value);403 if($Value != "") {set("dns/count",query("dns/count")+1);}404 }405 else if (charcodeat($token,0) == "D" && charcodeat($token,1) == "2") //2nd DNS406 {407 $Value = cut($token, 1, $delimiter2);408 set("dns/entry:2",$Value);409 if($Value != "") {set("dns/count",query("dns/count")+1);}410 }411 $i++;412 }413 $servicecmd = service_add($servicecmd,"WAN","restart");414 $dbsave = 1;415 }416 else if($cmd_name == "pppoe_info")417 {418 $path_inf_wan1 = XNODE_getpathbytarget("", "inf", "uid", $WAN1, 0);419 $wan1_inet = query($path_inf_wan1."/inet");420 $path_inet_wan1 = XNODE_getpathbytarget("/inet", "entry", "uid", $wan1_inet, 0);421 anchor($path_inet_wan1);422 $delimiter1 = "&";423 $delimiter2 = "=";424 $cnt = cut_count($cmd_value, $delimiter1);425 $i = 0;426 while ($i < $cnt)427 {428 $token = cut($cmd_value, $i, $delimiter1);429 if (charcodeat($token,0) == "E") // Enable or disable the PPPoE 430 {431 $Value = cut($token, 1, $delimiter2);432 if($Value == 1)433 {434 set("addrtype","ppp4");435 set("ppp4/over","eth");436 set("ppp4/static","0"); //Dynamic as default437 del("ppp4/ipaddr");438 }439 else // If we disable PPPoE, we currently use DHCP mode as default440 {441 set("addrtype","ipv4");442 set("ipv4/static","0");443 }444 }445 else if(charcodeat($token,0) == "U")// Username of the PPPoE account446 {447 $Value = cut($token, 1, $delimiter2);448 set("ppp4/username",$Value);449 }450 else if(charcodeat($token,0) == "P")// Password of the PPPoE account451 {452 $Value = cut($token, 1, $delimiter2);453 set("ppp4/password",$Value);454 }455 $i++;456 }457 $servicecmd = service_add($servicecmd,"WAN","restart");458 $dbsave = 1;459 }460 else if($cmd_name == "wlan_st_info")461 {462 $path_phyinf_wlan1 = XNODE_getpathbytarget("", "phyinf", "uid", $WLAN1, 0);463 set($path_phyinf_wlan1."/active",$cmd_value);464 $servicecmd = service_add($servicecmd,"PHYINF.WIFI","restart");465 $dbsave = 1;466 }467 else if($cmd_name == "wlan_info")468 {469 $path_phyinf_wlan1 = XNODE_getpathbytarget("", "phyinf", "uid", $WLAN1, 0);470 $path_wifi_wlan1 = XNODE_getpathbytarget("/wifi", "entry", "uid", query($path_phyinf_wlan1."/wifi"), 0);471 anchor($path_wifi_wlan1);472 $delimiter1 = "&";473 $delimiter2 = "=";474 $cnt = cut_count($cmd_value, $delimiter1);475 $is_wep = 0;476 $i = 0;477 while ($i < $cnt)478 {479 $token = cut($cmd_value, $i, $delimiter1);480 if (charcodeat($token,0) == "M") // Wireless operation mode481 {482 $Value = cut($token, 1, $delimiter2);483 // We save to mydlink root484 set($mydlink_path."/wifi/op_mode",$Value);485 }486 else if (charcodeat($token,0) == "I") // SSID of the connecting/connected AP487 {488 $Value = cut($token, 1, $delimiter2);489 set("ssid", $Value);490 }491 else if (charcodeat($token,0) == "S") // Security type492 {493 $Value = cut($token, 1, $delimiter2);494 if($Value == 0) //None495 {496 set("authtype", "OPEN");497 set("encrtype", "NONE");498 }499 else if($Value == 1) //WEP, OPEN500 {501 set("authtype", "OPEN");502 }503 else if($Value == 2) //WEP, SHARED504 {505 set("authtype", "SHARED");506 }507 else if($Value == 3) //WPA-PSK508 {509 set("authtype", "WPAPSK");510 }511 else if($Value == 4) //WPA2-PSK512 {513 set("authtype", "WPA2PSK");514 }515 else if($Value == 5) //WPA+2PSK516 {517 set("authtype", "WPA+2PSK");518 }519 else //Default520 {521 set("authtype", "OPEN");522 }523 }524 else if (charcodeat($token,0) == "E") // Encryption type525 {526 $Value = cut($token, 1, $delimiter2);527 if($Value == 0) // WEP, 64bit 528 {529 $is_wep = 1;530 set("encrtype", "WEP");531 set("nwkey/wep/size",64);532 set("nwkey/wep/ascii",1);533 }534 else if($Value == 1) // WEP, 128bit 535 {536 $is_wep = 1;537 set("encrtype", "WEP");538 set("nwkey/wep/size",128);539 set("nwkey/wep/ascii",1);540 }541 else if($Value == 2) // AES542 {543 set("encrtype", "AES");544 }545 else if($Value == 3) // TKIP546 {547 set("encrtype", "TKIP");548 }549 else if($Value == 4) // TKIP or AES550 {551 set("encrtype", "TKIP+AES");552 }553 else //Default554 {555 set("encrtype", "NONE");556 }557 }558 else if (charcodeat($token,0) == "K") // Encryption key559 {560 $Value = cut($token, 1, $delimiter2);561 if($is_wep == 1)562 {563 set("nwkey/wep/defkey",1);564 set("nwkey/wep/key:1",$Value);565 }566 else567 {568 set("nwkey/psk/key", $Value);569 }570 }571 $i++;572 }573 $servicecmd = service_add($servicecmd,"PHYINF.WIFI","restart");574 $dbsave = 1;575 }576 }577 578 del($run_mdb_path);579 if($servicecmd != "" || $dbsave == 1)580 {581 fwrite("w+", $_GLOBALS["SCRIPTFILE"], "#!/bin/sh\n");582 if($dbsave != 0) {fwrite("a", $_GLOBALS["SCRIPTFILE"], "event DBSAVE\n");}583 if($servicecmd != "") {fwrite("a", $_GLOBALS["SCRIPTFILE"], $servicecmd);}584 }585 586 return 0;587}588function mdb_main($WAN1,$WLAN1)589{590 $URLDECODED_ARGV = urlencode("d",$_GLOBALS["ARGV"]);591 if ($_GLOBALS["ACTION"]=="GET") {return mdb_get($_GLOBALS["CMD"],$WAN1,$WLAN1);}592 else if ($_GLOBALS["ACTION"]=="SET") {return mdb_set($_GLOBALS["CMD"],$URLDECODED_ARGV);}...
tools_database.php
Source:tools_database.php
...12 checkWrite();13 $db->query_halt=false;14 $sql=stripslashes($sql);15 $sql_list=explode(';',$sql);16 foreach($sql_list as $run){17 if($run=trim($run)){18 if(($s=strpos($run,' '))!==false){19 $sql_pre=strtoupper(substr($run,0,$s));20 $show=false;21 if ($sql_pre == 'EXPLAIN') $sql_pre = 'SELECT';22 switch($sql_pre){23 case 'USE':24 $db->query($run);25 break;26 case 'SELECT':27 $query=$db->query($run);28 if($rs_count=$db->num_rows($query)){29 $fields_name=$db->get_fields_name($query);30 $columns_count=count($fields_name);31 $show_result.='<table border="1" cellpadding="0" cellspacing="0" style="white-space: pre"><tr>';32 foreach($fields_name as $v){33 $show_result.='<td>'.$v.'</td>';34 }35 $show_result.='</tr>';36 while($line=$db->fetch_array($query)){37 //$show_result.="\n";38 //$show_result.=implode("\t",$line);39 $show_result.='<tr>';40 foreach($line as $v){41 $show_result.='<td>'.$v.'</td>';42 }43 $show_result.='</tr>';44 }45 //$show_result.="\n\nå
±ï¼$rs_count æ¡";46 $show_result.='<tr><td colspan="'.$columns_count.'">å
±ï¼'.$rs_count.' æ¡</td></tr></table>';47 } else {48 $show_result.='<table border="1" cellpadding="0" cellspacing="0"><tr><td>å
±ï¼0 æ¡</td></tr></table>';49 }50 break;51 case 'SHOW':52 $query=$db->query($run);53 if($rs_count=$db->num_rows($query)){54 $fields_name=$db->get_fields_name($query);55 $columns_count=count($fields_name);56 $show_result.='<table border="1" cellpadding="0" cellspacing="0" style="white-space: pre"><tr>';57 foreach($fields_name as $v){58 $show_result.='<td>'.$v.'</td>';59 }60 $show_result.='</tr>';61 while($line=$db->fetch_array($query)){62 //$show_result.="\n";63 //$show_result.=implode("\t",$line);64 $show_result.='<tr>';65 foreach($line as $v){66 $show_result.='<td>'.$v.'</td>';67 }68 $show_result.='</tr>';69 }70 //$show_result.="\n\nå
±ï¼$rs_count æ¡";71 $show_result.='<tr><td colspan="'.$columns_count.'">å
±ï¼'.$rs_count.' æ¡</td></tr></table>';72 } else {73 $show_result.='<table border="1" cellpadding="0" cellspacing="0"><tr><td>å
±ï¼0 æ¡</td></tr></table>';74 }75 break;76 case 'INSERT':77 $db->query($run);78 $show_result.='<table border="1" cellpadding="0" cellspacing="0"><tr><td>å
±å½±åï¼'.$db->affected_rows().' æ¡</td></tr></table>';79 break;80 case 'UPDATE':81 $show=false;82 $db->query($run);83 $show_result.='<table border="1" cellpadding="0" cellspacing="0"><tr><td>å
±å½±åï¼'.$db->affected_rows().' æ¡</td></tr></table>';84 break;85 default:86 $db->query($run);87 break;88 }89 if($errno=$db->errno()){90 $show_result.='<table border="1" cellpadding="0" cellspacing="0"><tr><td>'.$errno.'ï¼'.$db->error().'</td></tr></table>';91 }92 switch($sql_pre){93 case 'CREATE':94 if($errno)$show_result.='<table border="1" cellpadding="0" cellspacing="0"><tr><td>å建表失败</td></tr></table>';95 else $show_result.='<table border="1" cellpadding="0" cellspacing="0"><tr><td>å建表æå</td></tr></table>';96 break;97 }98 }99 }100 }...
run
Using AI Code Generation
1$obj = new show_result;2$obj->run();3$obj = new show_result;4$obj->run();5$obj = new show_result;6$obj->run();7$obj = new show_result;8$obj->run();9$obj = new show_result;10$obj->run();
run
Using AI Code Generation
1$show_result = new show_result();2$show_result->run();3$show_result = new show_result();4$show_result->run();5$show_result = new show_result();6$show_result->run();7$show_result = new show_result();8$show_result->run();9$show_result = new show_result();10$show_result->run();11$show_result = new show_result();12$show_result->run();13$show_result = new show_result();14$show_result->run();15$show_result = new show_result();16$show_result->run();17$show_result = new show_result();18$show_result->run();19$show_result = new show_result();20$show_result->run();21$show_result = new show_result();22$show_result->run();23$show_result = new show_result();24$show_result->run();25$show_result = new show_result();26$show_result->run();27$show_result = new show_result();28$show_result->run();
run
Using AI Code Generation
1$show_result = new show_result();2echo $show_result->run();3$show_result = new show_result();4echo $show_result->run();5$show_result = new show_result();6echo $show_result->run();7$show_result = new show_result();8echo $show_result->run();9$show_result = new show_result();10echo $show_result->run();11$show_result = new show_result();12echo $show_result->run();13$show_result = new show_result();14echo $show_result->run();15$show_result = new show_result();16echo $show_result->run();
run
Using AI Code Generation
1require_once('show_result.php');2$show_result = new show_result();3$show_result->run();4class show_result {5 public function run() {6 $this->show_result();7 }8 public function show_result() {9 echo 'Result';10 }11}
run
Using AI Code Generation
1$show_result = new show_result;2$show_result->run();3$show_result = new show_result;4$show_result->run();5$show_result = new show_result;6$show_result->run();7$show_result = new show_result;8$show_result->run();9$show_result = new show_result;10$show_result->run();11$show_result = new show_result;12$show_result->run();13$show_result = new show_result;14$show_result->run();15$show_result = new show_result;16$show_result->run();17$show_result = new show_result;18$show_result->run();19$show_result = new show_result;20$show_result->run();21$show_result = new show_result;22$show_result->run();
run
Using AI Code Generation
1require_once('show_result.php');2$obj = new show_result;3if(isset($_REQUEST['submit'])){4$obj->run();5}6require_once('show_result.php');7$obj = new show_result;8if(isset($_REQUEST['submit'])){9$obj->run();10}11require_once('show_result.php');12$obj = new show_result;13if(isset($_REQUEST['submit'])){14$obj->run();15}16require_once('show_result.php');17$obj = new show_result;18if(isset($_REQUEST['submit'])){19$obj->run();20}21require_once('show_result.php');22$obj = new show_result;23if(isset($_REQUEST['submit'])){24$obj->run();25}26require_once('show_result.php');27$obj = new show_result;28if(isset($_REQUEST['submit'])){29$obj->run();30}31require_once('show_result.php');32$obj = new show_result;33if(isset($_REQUEST['submit'])){34$obj->run();35}36require_once('show_result.php');37$obj = new show_result;38if(isset($_REQUEST['submit'])){39$obj->run();40}41require_once('show_result.php');42$obj = new show_result;43if(isset($_REQUEST['submit'])){44$obj->run();45}46require_once('show_result.php');47$obj = new show_result;48if(isset($_REQUEST['submit'])){49$obj->run();50}
Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Execute automation tests with run on a cloud-based Grid of 3000+ real browsers and operating systems for both web and mobile applications.
Test now for FreeGet 100 minutes of automation test minutes FREE!!