About 24,918 results: "php preg_match_all"
Page 14 of 50
Filter Results
Sources
Languages
Filter Results
Try Search On




  1. column_foreign_keys($h){global$l;$b=array();foreach($l->foreignKeys($h)as$I){foreach($I["source"]as$a){$b[$a][]=$I;}}return$b;}function
  2. enum_input($A,$ha,$g,$n,$zc=null){global$l;preg_match_all("~'((?:[^']|'')*)'~",$g["length"],$da);$b=(isset($zc)?"<label><input type='$A'$ha value='$zc'".((is_array($n)?in_array($zc,$n):$n===0)?" checked":"")."><i>".lang(4)."</i></label>":"");foreach($da[1]as$q=>$a){$a=stripcslashes(str_replace("''","'",$a));$zb=(is_int($n)?$n==$q+1:(is_array($n)?in_array($q+1,$n):$n===$a));$b.=" <label><input type='$A'$ha value='".($q+1)."'".($zb?' checked':'').'>'.h($l->editVal($a,$g)).'</label>';}return$b;}function
  3. nbsp($ea[""])."<td>".$l->editInput($_GET["edit"],$g,$ha,$n);}else{$za=0;foreach($ea
  4. as$d=>$a){if($d===""||!$a){break;}$za++;}$Ya=($za?" onchange=\"var f = this.form['function[".js_escape($e)."]']; if ($za > f.selectedIndex) f.selectedIndex = $za;\"":"");$ha.=$Ya;echo(count($ea)>1?html_select("function[$e]",$ea,!isset($L)||in_array($L,$ea)||isset($ea[$L])?$L:"","functionChange(this);"):nbsp(reset($ea))).'<td>';$fd=$l->editInput($_GET["edit"],$g,$ha,$n);if($fd!=""){echo$fd;}elseif($g["type"]=="set"){preg_match_all("~'((?:[^']|'')*)'~",$g["length"],$da);foreach($da[1]as$q=>$a){$a=stripcslashes(str_replace("''","'",$a));$zb=(is_int($n)?($n>>$q)&1:in_array($a,explode(",",$n),true));echo" <label><input type='checkbox' name='fields[$e][$q]' value='".(1<<$q)."'".($zb?' checked':'')."$Ya>".h($l->editVal($a,$g)).'</label>';}}elseif(ereg('blob|bytea|raw|file',$g["type"])&&ini_bool("file_uploads")){echo"<input type='file' name='fields-$e'$Ya>";}elseif(ereg('text|lob',$g["type"])){echo"<textarea ".($va!="sqlite"||ereg("\n",$n)?"cols='50' rows='12'":"cols='30' rows='1' style='height: 1.2em;'")."$ha>".h($n).'</textarea>';}else{$Bc=(!ereg('int',$g["type"])&&preg_match('~^(\\d+)(,(\\d+))?$~',$g["length"],$k)?((ereg("binary",$g["type"])?2:1)*$k[1]+($k[3]?1:0)+($k[2]&&!$g["unsigned"]?1:0)):($Z[$g["type"]]?$Z[$g["type"]]+($g["unsigned"]?0:1):0));echo"<input value='".h($n)."'".($Bc?" maxlength='$Bc'":"").(ereg('char|binary',$g["type"])&&$Bc>20?" size='40'":"")."$ha>";}}}function
  5. switch_lang(){global$fa,$Sa;echo"<form action=''>\n<div id='lang'>";hidden_fields($_GET,array('lang'));echo
  6. lang(7).": ".html_select("lang",$Sa,$fa,"var loc = location.search.replace(/[?&]lang=[^&]*/, ''); location.search = loc + (loc ? '&' : '') + 'lang=' + this.value;")," <input type='submit' value='".lang(8)."' class='hidden'>\n","</div>\n</form>\n";}if(isset($_GET["lang"])){$_COOKIE["adminer_lang"]=$_GET["lang"];$_SESSION["lang"]=$_GET["lang"];}$fa="en";if(isset($Sa[$_COOKIE["adminer_lang"]])){cookie("adminer_lang",$_COOKIE["adminer_lang"]);$fa=$_COOKIE["adminer_lang"];}elseif(isset($Sa[$_SESSION["lang"]])){$fa=$_SESSION["lang"];}else{$bc=array();preg_match_all('~([-a-z]+)(;q=([0-9.]+))?~',str_replace("_","-",strtolower($_SERVER["HTTP_ACCEPT_LANGUAGE"])),$da,PREG_SET_ORDER);foreach($da
  7. indexes($h,$M=null){global$f;if(!is_object($M)){$M=$f;}$b=array();foreach(get_rows("SHOW INDEX FROM ".table($h),$M)as$c){$b[$c["Key_name"]]["type"]=($c["Key_name"]=="PRIMARY"?"PRIMARY":($c["Index_type"]=="FULLTEXT"?"FULLTEXT":($c["Non_unique"]?"INDEX":"UNIQUE")));$b[$c["Key_name"]]["columns"][]=$c["Column_name"];$b[$c["Key_name"]]["lengths"][]=$c["Sub_part"];}return$b;}function
  8. foreign_keys($h){global$f,$Sb;static$S='`(?:[^`]|``)+`';$b=array();$md=$f->result("SHOW CREATE TABLE ".table($h),1);if($md){preg_match_all("~CONSTRAINT ($S) FOREIGN KEY \\(((?:$S,? ?)+)\\) REFERENCES ($S)(?:\\.($S))? \\(((?:$S,? ?)+)\\)(?: ON DELETE (".implode("|",$Sb)."))?(?: ON UPDATE (".implode("|",$Sb)."))?~",$md,$da,PREG_SET_ORDER);foreach($da
  9. as$k){preg_match_all("~$S~",$k[2],$xc);preg_match_all("~$S~",$k[5],$oa);$b[idf_unescape($k[1])]=array("db"=>idf_unescape($k[4]!=""?$k[3]:$k[4]),"table"=>idf_unescape($k[4]!=""?$k[4]:$k[3]),"source"=>array_map('idf_unescape',$xc[0]),"target"=>array_map('idf_unescape',$oa[0]),"on_delete"=>$k[6],"on_update"=>$k[7],);}}return$b;}function
  10. view($e){global$f;return
  11. array("Timing"=>array("BEFORE","AFTER"),"Type"=>array("FOR EACH ROW"),);}function
  12. routine($e,$A){global$f,$Ac,$pd,$Z;$Dd=array("bool","boolean","integer","double precision","real","dec","numeric","fixed","national char","national varchar");$ud="((".implode("|",array_merge(array_keys($Z),$Dd)).")(?:\\s*\\(((?:[^'\")]*|$Ac)+)\\))?\\s*(zerofill\\s*)?(unsigned(?:\\s+zerofill)?)?)(?:\\s*(?:CHARSET|CHARACTER\\s+SET)\\s*['\"]?([^'\"\\s]+)['\"]?)?";$S="\\s*(".($A=="FUNCTION"?"":implode("|",$pd)).")?\\s*(?:`((?:[^`]|``)*)`\\s*|\\b(\\S+)\\s+)$ud";$Qa=$f->result("SHOW CREATE $A ".idf_escape($e),2);preg_match("~\\(((?:$S\\s*,?)*)\\)".($A=="FUNCTION"?"\\s*RETURNS\\s+$ud":"")."\\s*(.*)~is",$Qa,$k);$t=array();preg_match_all("~$S\\s*,?~is",$k[1],$da,PREG_SET_ORDER);foreach($da
  13. selectEmailProcess($m,$Eb){if($_POST["email_append"]){return
  14. true;}if($_POST["email"]){$sd=0;if($_POST["all"]||$_POST["check"]){$g=idf_escape($_POST["email_field"]);$Kb=$_POST["email_subject"];$wa=$_POST["email_message"];preg_match_all('~\\{\\$([a-z0-9_]+)\\}~i',"$Kb.$wa",$da);$y=get_rows("SELECT DISTINCT $g".($da[1]?", ".implode(", ",array_map('idf_escape',array_unique($da[1]))):"")." FROM ".table($_GET["select"])." WHERE $g IS NOT NULL AND $g != ''".($m?" AND ".implode(" AND ",$m):"").($_POST["all"]?"":" AND ((".implode(") OR (",array_map('where_check',(array)$_POST["check"]))."))"));$t=fields($_GET["select"]);foreach($this->rowDescriptions($y,$Eb)as$c){$oc=array('{\\'=>'{');foreach($da[1]as$a){$oc['{$'."$a}"]=$this->editVal($c[$a],$t[$a]);}$mb=$c[$_POST["email_field"]];if(is_mail($mb)&&send_mail($mb,strtr($Kb,$oc),strtr($wa,$oc),$_POST["email_from"],$_FILES["email_files"])){$sd++;}}}cookie("adminer_email",$_POST["email_from"]);redirect(remove_from_uri(),lang(40,$sd));}return
  15. as$e=>$a){$a=process_input($t[$e]);if($a!==null){if($_POST["clone"]){$o[idf_escape($e)]=($a!==false?$a:idf_escape($e));}elseif($a!==false){$o[]=idf_escape($e)." = $a";}}}$j.=($_POST["clone"]?" (".implode(", ",array_keys($o)).")\nSELECT ".implode(", ",$o)."\nFROM ".table($w):" SET\n".implode(",\n",$o));}if($_POST["delete"]||$o){$cc="UPDATE";if($_POST["delete"]){$cc="DELETE";$j="FROM $j";}if($_POST["clone"]){$cc="INSERT";$j="INTO $j";}if($_POST["all"]||($ec===array()&&$_POST["check"])||count($na)<count($K)){$i=queries($cc." $j".($_POST["all"]?($m?"\nWHERE ".implode(" AND ",$m):""):"\nWHERE $ed"));$Oa=$f->affected_rows;}else{foreach((array)$_POST["check"]as$a){$i=queries($cc.limit1($j,"\nWHERE ".where_check($a)));if(!$i){break;}$Oa+=$f->affected_rows;}}}queries_redirect(remove_from_uri("page"),lang(64,$Oa),$i);}elseif(!$_POST["import"]){if(!$_POST["val"]){$p=lang(65);}else{$i=true;$Oa=0;foreach($_POST["val"]as$Fa=>$c){$o=array();foreach($c
  16. as$d=>$a){$d=bracket_escape($d,1);$o[]=idf_escape($d)." = ".(ereg('char|text',$t[$d]["type"])||$a!=""?$l->processInput($t[$d],$a):"NULL");}$j=table($w)." SET ".implode(", ",$o);$db=" WHERE ".where_check($Fa).($m?" AND ".implode(" AND ",$m):"");$i=queries("UPDATE".(count($na)<count($K)?" $j$db":limit1($j,$db)));if(!$i){break;}$Oa+=$f->affected_rows;}queries_redirect(remove_from_uri(),lang(64,$Oa),$i);}}elseif(is_string($qa=get_file("csv_file",true))){$i=true;$Wa=array_keys($t);preg_match_all('~(?>"[^"]*"|[^"\\r\\n]+)+~',$qa,$da);$Oa=count($da[0]);begin();$ia=($_POST["separator"]=="csv"?",":($_POST["separator"]=="tsv"?"\t":";"));foreach($da[0]as$d=>$a){preg_match_all("~((\"[^\"]*\")+|[^$ia]*)$ia~",$a.$ia,$pc);if(!$d&&!array_diff($pc[1],$Wa)){$Wa=$pc[1];$Oa--;}else{$o=array();foreach($pc[1]as$q=>$Ma){$o[idf_escape($Wa[$q])]=($Ma==""&&$t[$Wa[$q]]["null"]?"NULL":q(str_replace('""','"',preg_replace('~^"|"$~','',$Ma))));}$i=insert_update($w,$o,$ua);if(!$i){break;}}}if($i){queries("COMMIT");}queries_redirect(remove_from_uri("page"),lang(66,$Oa),$i);queries("ROLLBACK");}else{$p=upload_error($qa);}}}$xb=$l->tableName($D);page_header(lang(33).": $xb",$p);session_write_close();$o=null;if(isset($dd["insert"])){$o="";foreach((array)$_GET["where"]as$a){if(count($yb[$a["col"]])==1&&($a["op"]=="="||(!$a["op"]&&!ereg('[_%]',$a["val"])))){$o.="&set".urlencode("[".bracket_escape($a["col"])."]")."=".urlencode($a["val"]);}}}$l->selectLinks($D,$o);if(!$J){echo"<p class='error'>".lang(67).($t?".":": ".error())."\n";}else{echo"<form action='' id='form'>\n","<div style='display: none;'>";hidden_fields_get();echo(DB!=""?'<input type="hidden" name="db" value="'.h(DB).'">'.(isset($_GET["ns"])?'<input type="hidden" name="ns" value="'.h($_GET["ns"]).'">':""):"");echo'<input type="hidden" name="select" value="'.h($w).'">',"</div>\n";$l->selectColumnsPrint($K,$J);$l->selectSearchPrint($m,$J,$U);$l->selectOrderPrint($pa,$J,$U);$l->selectLimitPrint($F);$l->selectLengthPrint($fb);$l->selectActionPrint($fb);echo"</form>\n";$Q=$_GET["page"];if($Q=="last"){$Ba=$f->result("SELECT COUNT(*) FROM ".table($w).($m?" WHERE ".implode(" AND ",$m):""));$Q=floor(max(0,$Ba-1)/$F);}$j="SELECT".limit((+$F&&$na&&count($na)<count($K)&&$va=="sql"?"SQL_CALC_FOUND_ROWS ":"").$hb,($m?"\nWHERE ".implode(" AND ",$m):"").$rc,($F!=""?+$F:null),($Q?$F*$Q:0),"\n");echo$l->selectQuery($j);$i=$f->query($j);if(!$i){echo"<p class='error'>".error()."\n";}else{if($va=="mssql"){$i->seek($F*$Q);}$ac=array();echo"<form action='' method='post' enctype='multipart/form-data'>\n";$y=array();while($c=$i->fetch_assoc()){$y[]=$c;}if($_GET["page"]!="last"){$Ba=(+$F&&$na&&count($na)<count($K)?($va=="sql"?$f->result(" SELECT FOUND_ROWS()"):$f->result("SELECT COUNT(*) FROM ($j) x")):count($y));}if(!$y){echo"<p class='message'>".lang(68)."\n";}else{$uc=$l->backwardKeys($w,$xb);echo"<table cellspacing='0' class='nowrap' onclick='tableClick(event);' onkeydown='return editingKeydown(event);'>\n","<thead><tr>".(!$na&&$K?"":"<td><input type='checkbox' id='all-page' onclick='formCheck(this, /check/);'> <a href='".h($_GET["modify"]?remove_from_uri("modify"):$_SERVER["REQUEST_URI"]."&modify=1")."'>".lang(69)."</a>");$nc=array();$ea=array();reset($K);$Vc=1;foreach($y[0]as$d=>$a){if($D["Oid"]!="t"||$d!="oid"){$a=$_GET["columns"][key($K)];$g=$t[$K?$a["col"]:$d];$e=($g?$l->fieldName($g,$Vc):"*");if($e!=""){$Vc++;$nc[$d]=$e;$u=idf_escape($d);echo'<th><a href="'.h(remove_from_uri('(order|desc)[^=]*|page').'&order%5B0%5D='.urlencode($d).($pa[0]==$u||$pa[0]==$d||(!$pa&&$na[0]==$u)?'&desc%5B0%5D=1':'')).'">'.apply_sql_function($a["fun"],$e)."</a>";}$ea[$d]=$a["fun"];next($K);}}$jc=array();if($_GET["modify"]){foreach($y
















Back to Top