About 1 result: "php preg_match_all repo:JaJcoo/quick-start"
Page 1 of 1
Filter Results
Sources
Languages
Filter Results
Try Search On
index.php in quick-start https://github.com/JaJcoo/quick-start.git | 1602 lines | PHP
  1. column_foreign_keys($N){global$b;$F=array();foreach($b->foreignKeys($N)as$n){foreach($n["source"]as$W)$F[$W][]=$n;}return$F;}function
  2. enum_input($S,$za,$l,$X,$Gb=null){global$b;preg_match_all("~'((?:[^']|'')*)'~",$l["length"],$gd);$F=($Gb!==null?"<label><input type='$S'$za value='$Gb'".((is_array($X)?in_array($Gb,$X):$X===0)?" checked":"")."><i>".lang(4)."</i></label>":"");foreach($gd[1]as$p=>$W){$W=stripcslashes(str_replace("''","'",$W));$Na=(is_int($X)?$X==$p+1:(is_array($X)?in_array($p+1,$X):$X===$W));$F.=" <label><input type='$S'$za value='".($p+1)."'".($Na?' checked':'').'>'.h($b->editVal($W,$l)).'</label>';}return$F;}function
  3. nbsp($qc[""])."<td>".$b->editInput($_GET["edit"],$l,$za,$X);else{$fc=0;foreach($qc
  4. as$v=>$W){if($v===""||!$W)break;$fc++;}$Id=($fc?" onchange=\"var f = this.form['function[".h(js_escape(bracket_escape($l["field"])))."]']; if ($fc > f.selectedIndex) f.selectedIndex = $fc;\"":"");$za.=$Id;echo(count($qc)>1?html_select("function[$_]",$qc,$o===null||in_array($o,$qc)||isset($qc[$o])?$o:"","functionChange(this);"):nbsp(reset($qc))).'<td>';$Ic=$b->editInput($_GET["edit"],$l,$za,$X);if($Ic!="")echo$Ic;elseif($l["type"]=="set"){preg_match_all("~'((?:[^']|'')*)'~",$l["length"],$gd);foreach($gd[1]as$p=>$W){$W=stripcslashes(str_replace("''","'",$W));$Na=(is_int($X)?($X>>$p)&1:in_array($W,explode(",",$X),true));echo" <label><input type='checkbox' name='fields[$_][$p]' value='".(1<<$p)."'".($Na?' checked':'')."$Id>".h($b->editVal($W,$l)).'</label>';}}elseif(ereg('blob|bytea|raw|file',$l["type"])&&ini_bool("file_uploads"))echo"<input type='file' name='fields-$_'$Id>";elseif(ereg('text|lob',$l["type"]))echo"<textarea ".($u!="sqlite"||ereg("\n",$X)?"cols='50' rows='12'":"cols='30' rows='1' style='height: 1.2em;'")."$za>".h($X).'</textarea>';else{$md=(!ereg('int',$l["type"])&&preg_match('~^(\\d+)(,(\\d+))?$~',$l["length"],$z)?((ereg("binary",$l["type"])?2:1)*$z[1]+($z[3]?1:0)+($z[2]&&!$l["unsigned"]?1:0)):($T[$l["type"]]?$T[$l["type"]]+($l["unsigned"]?0:1):0));echo"<input value='".h($X)."'".($md?" maxlength='$md'":"").(ereg('char|binary',$l["type"])&&$md>20?" size='40'":"")."$za>";}}}function
  5. switch_lang(){global$ca,$Sc;echo"<form action=''>\n<div id='lang'>";hidden_fields($_GET,array('lang'));echo
  6. lang(8).": ".html_select("lang",$Sc,$ca,"var loc = location.search.replace(/[?&]lang=[^&]*/, ''); location.search = loc + (loc ? '&' : '') + 'lang=' + this.value;")," <input type='submit' value='".lang(9)."' class='hidden'>\n","</div>\n</form>\n";}if(isset($_GET["lang"])){$_COOKIE["adminer_lang"]=$_GET["lang"];$_SESSION["lang"]=$_GET["lang"];}$ca="en";if(isset($Sc[$_COOKIE["adminer_lang"]])){cookie("adminer_lang",$_COOKIE["adminer_lang"]);$ca=$_COOKIE["adminer_lang"];}elseif(isset($Sc[$_SESSION["lang"]]))$ca=$_SESSION["lang"];else{$pa=array();preg_match_all('~([-a-z]+)(;q=([0-9.]+))?~',str_replace("_","-",strtolower($_SERVER["HTTP_ACCEPT_LANGUAGE"])),$gd,PREG_SET_ORDER);foreach($gd
  7. foreign_keys($N){global$g,$Hd;static$je='`(?:[^`]|``)+`';$F=array();$gb=$g->result("SHOW CREATE TABLE ".table($N),1);if($gb){preg_match_all("~CONSTRAINT ($je) FOREIGN KEY \\(((?:$je,? ?)+)\\) REFERENCES ($je)(?:\\.($je))? \\(((?:$je,? ?)+)\\)(?: ON DELETE ($Hd))?(?: ON UPDATE ($Hd))?~",$gb,$gd,PREG_SET_ORDER);foreach($gd
  8. as$z){preg_match_all("~$je~",$z[2],$df);preg_match_all("~$je~",$z[5],$zf);$F[idf_unescape($z[1])]=array("db"=>idf_unescape($z[4]!=""?$z[3]:$z[4]),"table"=>idf_unescape($z[4]!=""?$z[4]:$z[3]),"source"=>array_map('idf_unescape',$df[0]),"target"=>array_map('idf_unescape',$zf[0]),"on_delete"=>($z[6]?$z[6]:"RESTRICT"),"on_update"=>($z[7]?$z[7]:"RESTRICT"),);}}return$F;}function
  9. view($_){global$g;return
  10. array("Timing"=>array("BEFORE","AFTER"),"Type"=>array("FOR EACH ROW"),);}function
  11. routine($_,$S){global$g,$Kb,$Hc,$T;$va=array("bool","boolean","integer","double precision","real","dec","numeric","fixed","national char","national varchar");$Qf="((".implode("|",array_merge(array_keys($T),$va)).")\\b(?:\\s*\\(((?:[^'\")]*|$Kb)+)\\))?\\s*(zerofill\\s*)?(unsigned(?:\\s+zerofill)?)?)(?:\\s*(?:CHARSET|CHARACTER\\s+SET)\\s*['\"]?([^'\"\\s]+)['\"]?)?";$je="\\s*(".($S=="FUNCTION"?"":$Hc).")?\\s*(?:`((?:[^`]|``)*)`\\s*|\\b(\\S+)\\s+)$Qf";$fb=$g->result("SHOW CREATE $S ".idf_escape($_),2);preg_match("~\\(((?:$je\\s*,?)*)\\)\\s*".($S=="FUNCTION"?"RETURNS\\s+$Qf\\s+":"")."(.*)~is",$fb,$z);$m=array();preg_match_all("~$je\\s*,?~is",$z[1],$gd,PREG_SET_ORDER);foreach($gd
  12. <td><input name="',$v,'[length]" value="',h($l["length"]),'" size="3" onfocus="editingLengthFocus(this);"><td class="options">',"<select name='$v"."[collation]'".(ereg('(char|text|enum|set)$',$l["type"])?"":" class='hidden'").'><option value="">('.lang(87).')'.optionlist($Sa,$l["collation"]).'</select>',($Xf?"<select name='$v"."[unsigned]'".(!$l["type"]||ereg('(int|float|double|decimal)$',$l["type"])?"":" class='hidden'").'><option>'.optionlist($Xf,$l["unsigned"]).'</select>':''),($jc?"<select name='$v"."[on_delete]'".(ereg("`",$l["type"])?"":" class='hidden'")."><option value=''>(".lang(88).")".optionlist(explode("|",$Hd),$l["on_delete"])."</select> ":" ");}function
  13. process_length($w){global$Kb;return(preg_match("~^\\s*(?:$Kb)(?:\\s*,\\s*(?:$Kb))*\\s*\$~",$w)&&preg_match_all("~$Kb~",$w,$gd)?implode(",",$gd[0]):preg_replace('~[^0-9,+-]~','',$w));}function
  14. as$_=>$n){echo"<tr title='".h($_)."'>","<th><i>".implode("</i>, <i>",array_map('h',$n["source"]))."</i>","<td><a href='".h($n["db"]!=""?preg_replace('~db=[^&]*~',"db=".urlencode($n["db"]),ME):($n["ns"]!=""?preg_replace('~ns=[^&]*~',"ns=".urlencode($n["ns"]),ME):ME))."table=".urlencode($n["table"])."'>".($n["db"]!=""?"<b>".h($n["db"])."</b>.":"").($n["ns"]!=""?"<b>".h($n["ns"])."</b>.":"").h($n["table"])."</a>","(<i>".implode("</i>, <i>",array_map('h',$n["target"]))."</i>)","<td>".nbsp($n["on_delete"])."\n","<td>".nbsp($n["on_update"])."\n";if($u!="sqlite")echo'<td><a href="'.h(ME.'foreign='.urlencode($a).'&name='.urlencode($_)).'">'.lang(109).'</a>';}echo"</table>\n";}if($u!="sqlite")echo'<p><a href="'.h(ME).'foreign='.urlencode($a).'">'.lang(110)."</a>\n";}if(support("trigger")){echo"<h3>".lang(111)."</h3>\n";$Of=triggers($a);if($Of){echo"<table cellspacing='0'>\n";foreach($Of
  15. as$v=>$W)echo"<tr valign='top'><td>$W[0]<td>$W[1]<th>".h($v)."<td><a href='".h(ME.'trigger='.urlencode($a).'&name='.urlencode($v))."'>".lang(109)."</a>\n";echo"</table>\n";}echo'<p><a href="'.h(ME).'trigger='.urlencode($a).'">'.lang(112)."</a>\n";}}}}elseif(isset($_GET["schema"])){page_header(lang(52),"",array(),DB.($_GET["ns"]?".$_GET[ns]":""));$uf=array();$vf=array();$_="adminer_schema";$ea=($_GET["schema"]?$_GET["schema"]:$_COOKIE[($_COOKIE["$_-".DB]?"$_-".DB:$_)]);preg_match_all('~([^:]+):([-0-9.]+)x([-0-9.]+)(_|$)~',$ea,$gd,PREG_SET_ORDER);foreach($gd
  16. </form>
  17. ';}elseif(isset($_GET["user"])){$ha=$_GET["user"];$we=array(""=>array("All privileges"=>""));foreach(get_rows("SHOW PRIVILEGES")as$G){foreach(explode(",",($G["Privilege"]=="Grant option"?"":$G["Context"]))as$cb)$we[$cb][$G["Privilege"]]=$G["Comment"];}$we["Server Admin"]+=$we["File access on server"];$we["Databases"]["Create routine"]=$we["Procedures"]["Create routine"];unset($we["Procedures"]["Create routine"]);$we["Columns"]=array();foreach(array("Select","Insert","Update","References")as$W)$we["Columns"][$W]=$we["Tables"][$W];unset($we["Server Admin"]["Usage"]);foreach($we["Tables"]as$v=>$W)unset($we["Databases"][$v]);$zd=array();if($_POST){foreach($_POST["objects"]as$v=>$W)$zd[$W]=(array)$zd[$W]+(array)$_POST["grants"][$v];}$sc=array();$Ed="";if(isset($_GET["host"])&&($E=$g->query("SHOW GRANTS FOR ".q($ha)."@".q($_GET["host"])))){while($G=$E->fetch_row()){if(preg_match('~GRANT (.*) ON (.*) TO ~',$G[0],$z)&&preg_match_all('~ *([^(,]*[^ ,(])( *\\([^)]+\\))?~',$z[1],$gd,PREG_SET_ORDER)){foreach($gd

Back to Top