About 63,824 results: "php is_object"
Page 1 of 50
Filter Results
Sources
Languages
Filter Results
Try Search On



is_object.php in hppg http://hppg.googlecode.com/svn/trunk/ | 55 lines | PHP
  1.     {
  2.         return is_object( $value );




  1. is_url($N){$Cb='[a-z0-9]([-a-z0-9]{0,61}[a-z0-9])';return(preg_match("~^(https?)://($Cb?\\.)+$Cb(:\\d+)?(/.*)?(\\?.*)?(#.*)?\$~i",$N,$_)?strtolower($_[1]):"");}function
  2. slow_query($F){global$b,$S;$k=$b->database();if(support("kill")&&is_object($i=connect())&&($k==""||$i->select_db($k))){$ed=$i->result("SELECT CONNECTION_ID()");echo'<script type="text/javascript">
  3. store_result(){return$this->_result;}function
  4. result($F,$m=0){$G=$this->query($F);if(!is_object($G))return
  5. ORDER BY a.attnum")as$I){ereg('(.*)(\\((.*)\\))?',$I["full_type"],$_);list(,$I["type"],,$I["length"])=$_;$I["full_type"]=$I["type"].($I["length"]?"($I[length])":"");$I["null"]=($I["attnotnull"]=="f");$I["auto_increment"]=eregi("^nextval\\(",$I["default"]);$I["privileges"]=array("insert"=>1,"select"=>1,"update"=>1);if(preg_match('~^(.*)::.+$~',$I["default"],$_))$I["default"]=($_[1][0]=="'"?idf_unescape($_[1]):$_[1]);$H[$I["field"]]=$I;}return$H;}function
  6. indexes($P,$i=null){global$h;if(!is_object($i))$i=$h;$H=array();$Mf=$i->result("SELECT oid FROM pg_class WHERE relnamespace = (SELECT oid FROM pg_namespace WHERE nspname = current_schema()) AND relname = ".q($P));$f=get_key_vals("SELECT attnum, attname FROM pg_attribute WHERE attrelid = $Mf AND attnum > 0",$i);foreach(get_rows("SELECT relname, indisunique, indisprimary, indkey FROM pg_index i, pg_class ci WHERE i.indrelid = $Mf AND ci.oid = i.indexrelid",$i)as$I){$H[$I["relname"]]["type"]=($I["indisprimary"]=="t"?"PRIMARY":($I["indisunique"]=="t"?"UNIQUE":"INDEX"));$H[$I["relname"]]["columns"]=array();foreach(explode(" ",$I["indkey"])as$Oc)$H[$I["relname"]]["columns"][]=$f[$Oc];$H[$I["relname"]]["lengths"]=array();}return$H;}function
  7. false;}function
  8. result($F,$m=1){$G=$this->query($F);if(!is_object($G)||!oci_fetch($G->_result))return
  9. mssql_next_result($this->_result);}function
  10. result($F,$m=0){$G=$this->query($F);if(!is_object($G))return
  11. ';}}echo'
  12. <body class="',lang(60),' nojs" onkeydown="bodyKeydown(event);" onclick="bodyClick(event);" onload="bodyLoad(\'',(is_object($h)?substr($h->server_info,0,3):""),'\');',(isset($_COOKIE["adminer_version"])?"":" verifyVersion();"),'">
  13. ';$pc=true;foreach($Ge
  14. as$w=>$X){if($w!=""&&$X>1){echo($pc?"<p>":" ")."<a href='".h(ME)."dump=".urlencode("$w%")."'>".h($w)."</a>";$pc=false;}}}elseif(isset($_GET["privileges"])){page_header(lang(53));$G=$h->query("SELECT User, Host FROM mysql.".(DB==""?"user":"db WHERE ".q(DB)." LIKE Db")." ORDER BY Host, User");$Ac=$G;if(!$G)$G=$h->query("SELECT SUBSTRING_INDEX(CURRENT_USER, '@', 1) AS User, SUBSTRING_INDEX(CURRENT_USER, '@', -1) AS Host");echo"<form action=''><p>\n";hidden_fields_get();echo"<input type='hidden' name='db' value='".h(DB)."'>\n",($Ac?"":"<input type='hidden' name='grant' value=''>\n"),"<table cellspacing='0'>\n","<thead><tr><th>".lang(22)."<th>".lang(21)."<th>&nbsp;</thead>\n";while($I=$G->fetch_assoc())echo'<tr'.odd().'><td>'.h($I["User"])."<td>".h($I["Host"]).'<td><a href="'.h(ME.'user='.urlencode($I["User"]).'&host='.urlencode($I["Host"])).'">'.lang(33)."</a>\n";if(!$Ac||DB!="")echo"<tr".odd()."><td><input name='user'><td><input name='host' value='localhost'><td><input type='submit' value='".lang(33)."'>\n";echo"</table>\n","</form>\n",'<p><a href="'.h(ME).'user=">'.lang(120)."</a>";}elseif(isset($_GET["sql"])){if(!$l&&$_POST["export"]){dump_headers("sql");$b->dumpTable("","");$b->dumpData("","table",$_POST["query"]);exit;}restart_session();$Hc=&get_session("queries");$Gc=&$Hc[DB];if(!$l&&$_POST["clear"]){$Gc=array();redirect(remove_from_uri("history"));}page_header(lang(46),$l);if(!$l&&$_POST){$xc=false;$F=$_POST["query"];if($_POST["webfile"]){$xc=@fopen((file_exists("adminer.sql")?"adminer.sql":(file_exists("adminer.sql.gz")?"compress.zlib://adminer.sql.gz":"compress.bzip2://adminer.sql.bz2")),"rb");$F=($xc?fread($xc,1e6):false);}elseif($_FILES&&$_FILES["sql_file"]["error"]!=UPLOAD_ERR_NO_FILE)$F=get_file("sql_file",true);if(is_string($F)){if(function_exists('memory_get_usage'))@ini_set("memory_limit",max(ini_bytes("memory_limit"),2*strlen($F)+memory_get_usage()+8e6));if($F!=""&&strlen($F)<1e6){$E=$F.(ereg(";[ \t\r\n]*\$",$F)?"":";");if(!$Gc||reset(end($Gc))!=$E){restart_session();$Gc[]=array($E,time());set_session("queries",$Hc);stop_session();}}$yf="(?:\\s|/\\*.*\\*/|(?:#|-- )[^\n]*\n|--\n)";$xb=";";$B=0;$Qb=true;$i=connect();if(is_object($i)&&DB!="")$i->select_db(DB);$bb=0;$Xb=array();$pd=0;$te='[\'"'.($v=="sql"?'`#':($v=="sqlite"?'`[':($v=="mssql"?'[':''))).']|/\\*|-- |$'.($v=="pgsql"?'|\\$[^$]*\\$':'');$dg=microtime();parse_str($_COOKIE["adminer_export"],$qa);$Ib=$b->dumpFormat();unset($Ib["sql"]);while($F!=""){if(!$B&&preg_match("~^$yf*DELIMITER\\s+(\\S+)~i",$F,$_)){$xb=$_[1];$F=substr($F,strlen($_[0]));}else{preg_match('('.preg_quote($xb)."\\s*|$te)",$F,$_,PREG_OFFSET_CAPTURE,$B);list($vc,$Be)=$_[0];if(!$vc&&$xc&&!feof($xc))$F.=fread($xc,1e5);else{if(!$vc&&rtrim($F)=="")break;$B=$Be+strlen($vc);if($vc&&rtrim($vc)!=$xb){while(preg_match('('.($vc=='/*'?'\\*/':($vc=='['?']':(ereg('^-- |^#',$vc)?"\n":preg_quote($vc)."|\\\\."))).'|$)s',$F,$_,PREG_OFFSET_CAPTURE,$B)){$lf=$_[0][0];if(!$lf&&$xc&&!feof($xc))$F.=fread($xc,1e5);else{$B=$_[0][1]+strlen($lf);if($lf[0]!="\\")break;}}}else{$Qb=false;$E=substr($F,0,$Be);$bb++;$Je="<pre id='sql-$bb'><code class='jush-$v'>".shorten_utf8(trim($E),1000)."</code></pre>\n";if(!$_POST["only_errors"]){echo$Je;ob_flush();flush();}$_f=microtime();if($h->multi_query($E)&&is_object($i)&&preg_match("~^$yf*USE\\b~isU",$E))$i->query($E);do{$G=$h->store_result();$Rb=microtime();$Wf=format_time($_f,$Rb).(strlen($E)<1000?" <a href='".h(ME)."sql=".urlencode(trim($E))."'>".lang(33)."</a>":"");if($h->error){echo($_POST["only_errors"]?$Je:""),"<p class='error'>".lang(121).": ".error()."\n";$Xb[]=" <a href='#sql-$bb'>$bb</a>";if($_POST["error_stops"])break
  15. 2;}elseif(is_object($G)){$ie=select($G,$i);if(!$_POST["only_errors"]){echo"<form action='' method='post'>\n","<p>".($G->num_rows?lang(122,$G->num_rows):"").$Wf;$r="export-$bb";$gc=", <a href='#$r' onclick=\"return !toggle('$r');\">".lang(114)."</a><span id='$r' class='hidden'>: ".html_select("output",$b->dumpOutput(),$qa["output"])." ".html_select("format",$Ib,$qa["format"])."<input type='hidden' name='query' value='".h($E)."'>"." <input type='submit' name='export' value='".lang(114)."'><input type='hidden' name='token' value='$S'></span>\n";if($i&&preg_match("~^($yf|\\()*SELECT\\b~isU",$E)&&($fc=explain($i,$E))){$r="explain-$bb";echo", <a href='#$r' onclick=\"return !toggle('$r');\">EXPLAIN</a>$gc","<div id='$r' class='hidden'>\n";select($fc,$i,($v=="sql"?"http://dev.mysql.com/doc/refman/".substr($h->server_info,0,3)."/en/explain-output.html#explain_":""),$ie);echo"</div>\n";}else
  16. </form>
  17. ';}elseif(isset($_GET["call"])){$da=$_GET["call"];page_header(lang(168).": ".h($da),$l);$hf=routine($da,(isset($_GET["callf"])?"FUNCTION":"PROCEDURE"));$Mc=array();$oe=array();foreach($hf["fields"]as$q=>$m){if(substr($m["inout"],-3)=="OUT")$oe[$q]="@".idf_escape($m["field"])." AS ".idf_escape($m["field"]);if(!$m["inout"]||substr($m["inout"],0,2)=="IN")$Mc[]=$q;}if(!$l&&$_POST){$Oa=array();foreach($hf["fields"]as$w=>$m){if(in_array($w,$Mc)){$X=process_input($m);if($X===false)$X="''";if(isset($oe[$w]))$h->query("SET @".idf_escape($m["field"])." = $X");}$Oa[]=(isset($oe[$w])?"@".idf_escape($m["field"]):$X);}$F=(isset($_GET["callf"])?"SELECT":"CALL")." ".idf_escape($da)."(".implode(", ",$Oa).")";echo"<p><code class='jush-$v'>".h($F)."</code> <a href='".h(ME)."sql=".urlencode($F)."'>".lang(33)."</a>\n";if(!$h->multi_query($F))echo"<p class='error'>".error()."\n";else{$i=connect();if(is_object($i))$i->select_db(DB);do{$G=$h->store_result();if(is_object($G))select($G,$i);else

  1. ereg('char|text|lob|geometry|point|linestring|polygon',$m["type"]);}function
  2. slow_query($F){global$b,$R;$k=$b->database();if(support("kill")&&is_object($i=connect())&&($k==""||$i->select_db($k))){$dd=$i->result("SELECT CONNECTION_ID()");echo'<script type="text/javascript">
  3. store_result(){return$this->_result;}function
  4. result($F,$m=0){$G=$this->query($F);if(!is_object($G))return
  5. ORDER BY a.attnum")as$I){ereg('(.*)(\\((.*)\\))?',$I["full_type"],$_);list(,$I["type"],,$I["length"])=$_;$I["full_type"]=$I["type"].($I["length"]?"($I[length])":"");$I["null"]=($I["attnotnull"]=="f");$I["auto_increment"]=eregi("^nextval\\(",$I["default"]);$I["privileges"]=array("insert"=>1,"select"=>1,"update"=>1);if(preg_match('~^(.*)::.+$~',$I["default"],$_))$I["default"]=($_[1][0]=="'"?idf_unescape($_[1]):$_[1]);$H[$I["field"]]=$I;}return$H;}function
  6. indexes($O,$i=null){global$h;if(!is_object($i))$i=$h;$H=array();$Mf=$i->result("SELECT oid FROM pg_class WHERE relnamespace = (SELECT oid FROM pg_namespace WHERE nspname = current_schema()) AND relname = ".q($O));$f=get_key_vals("SELECT attnum, attname FROM pg_attribute WHERE attrelid = $Mf AND attnum > 0",$i);foreach(get_rows("SELECT relname, indisunique, indisprimary, indkey FROM pg_index i, pg_class ci WHERE i.indrelid = $Mf AND ci.oid = i.indexrelid",$i)as$I){$H[$I["relname"]]["type"]=($I["indisprimary"]=="t"?"PRIMARY":($I["indisunique"]=="t"?"UNIQUE":"INDEX"));$H[$I["relname"]]["columns"]=array();foreach(explode(" ",$I["indkey"])as$Nc)$H[$I["relname"]]["columns"][]=$f[$Nc];$H[$I["relname"]]["lengths"]=array();}return$H;}function
  7. false;}function
  8. result($F,$m=1){$G=$this->query($F);if(!is_object($G)||!oci_fetch($G->_result))return
  9. sqlsrv_next_result($this->_result);}function
  10. result($F,$m=0){$G=$this->query($F);if(!is_object($G))return
  11. mssql_next_result($this->_result);}function
  12. result($F,$m=0){$G=$this->query($F);if(!is_object($G))return
  13. ';}}echo'
  14. <body class="',lang(60),' nojs" onkeydown="bodyKeydown(event);" onclick="bodyClick(event);" onload="bodyLoad(\'',(is_object($h)?substr($h->server_info,0,3):""),'\');',(isset($_COOKIE["adminer_version"])?"":" verifyVersion();"),'">
  15. </form>
  16. ';}elseif(isset($_GET["call"])){$da=$_GET["call"];page_header(lang(169).": ".h($da),$l);$gf=routine($da,(isset($_GET["callf"])?"FUNCTION":"PROCEDURE"));$Lc=array();$ne=array();foreach($gf["fields"]as$q=>$m){if(substr($m["inout"],-3)=="OUT")$ne[$q]="@".idf_escape($m["field"])." AS ".idf_escape($m["field"]);if(!$m["inout"]||substr($m["inout"],0,2)=="IN")$Lc[]=$q;}if(!$l&&$_POST){$Oa=array();foreach($gf["fields"]as$w=>$m){if(in_array($w,$Lc)){$W=process_input($m);if($W===false)$W="''";if(isset($ne[$w]))$h->query("SET @".idf_escape($m["field"])." = $W");}$Oa[]=(isset($ne[$w])?"@".idf_escape($m["field"]):$W);}$F=(isset($_GET["callf"])?"SELECT":"CALL")." ".idf_escape($da)."(".implode(", ",$Oa).")";echo"<p><code class='jush-$v'>".h($F)."</code> <a href='".h(ME)."sql=".urlencode($F)."'>".lang(33)."</a>\n";if(!$h->multi_query($F))echo"<p class='error'>".error()."\n";else{$i=connect();if(is_object($i))$i->select_db(DB);do{$G=$h->store_result();if(is_object($G))select($G,$i);else




  1. q($L){global$g;return$g->quote($L);}function
  2. get_vals($D,$e=0){global$g;$F=array();$E=$g->query($D);if(is_object($E)){while($G=$E->fetch_row())$F[]=$G[$e];}return$F;}function
  3. get_key_vals($D,$h=null){global$g;if(!is_object($h))$h=$g;$F=array();$E=$h->query($D);if(is_object($E)){while($G=$E->fetch_row())$F[$G[0]]=$G[1];}return$F;}function
  4. get_rows($D,$h=null,$k="<p class='error'>"){global$g;$ab=(is_object($h)?$h:$g);$F=array();$E=$ab->query($D);if(is_object($E)){while($G=$E->fetch_assoc())$F[]=$G;}elseif(!$E&&!is_object($h)&&$k&&defined("PAGE_HEADER"))echo$k.error()."\n";return$F;}function
  5. unique_array($G,$t){foreach($t
  6. store_result(){return$this->_result;}function
  7. result($D,$l=0){$E=$this->query($D);if(!is_object($E))return
  8. false;}function
  9. result($D,$l=1){$E=$this->query($D);if(!is_object($E)||!oci_fetch($E->_result))return
  10. sqlsrv_next_result($this->_result);}function
  11. result($D,$l=0){$E=$this->query($D);if(!is_object($E))return
  12. mssql_next_result($this->_result);}function
  13. result($D,$l=0){$E=$this->query($D);if(!is_object($E))return
  14. </form>
  15. ';}elseif(isset($_GET["call"])){$da=$_GET["call"];page_header(lang(168).": ".h($da),$k);$Ne=routine($da,(isset($_GET["callf"])?"FUNCTION":"PROCEDURE"));$Cc=array();$Xd=array();foreach($Ne["fields"]as$p=>$l){if(substr($l["inout"],-3)=="OUT")$Xd[$p]="@".idf_escape($l["field"])." AS ".idf_escape($l["field"]);if(!$l["inout"]||substr($l["inout"],0,2)=="IN")$Cc[]=$p;}if(!$k&&$_POST){$Ka=array();foreach($Ne["fields"]as$v=>$l){if(in_array($v,$Cc)){$W=process_input($l);if($W===false)$W="''";if(isset($Xd[$v]))$g->query("SET @".idf_escape($l["field"])." = $W");}$Ka[]=(isset($Xd[$v])?"@".idf_escape($l["field"]):$W);}$D=(isset($_GET["callf"])?"SELECT":"CALL")." ".idf_escape($da)."(".implode(", ",$Ka).")";echo"<p><code class='jush-$u'>".h($D)."</code> <a href='".h(ME)."sql=".urlencode($D)."'>".lang(33)."</a>\n";if(!$g->multi_query($D))echo"<p class='error'>".error()."\n";else{$h=connect();if(is_object($h))$h->select_db(DB);do{$E=$g->store_result();if(is_object($E))select($E,$h);else








Back to Top