• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP fetchtablelist函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中fetchtablelist函数的典型用法代码示例。如果您正苦于以下问题:PHP fetchtablelist函数的具体用法?PHP fetchtablelist怎么用?PHP fetchtablelist使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了fetchtablelist函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: sql_run

     if ($admin_runquery) {
         $result = sql_run($_POST['sql_content']);
         if ($result) {
             flash("success");
         } else {
             flash();
         }
     } else {
         flash("admin_runquery_forbidden");
     }
 }
 if ($do == "backup") {
     $filename = date('ymd') . '_' . pb_radom(6);
     $db->query('SET SQL_QUOTE_SHOW_CREATE=0', 'SILENT');
     $time = gmdate("M d Y H:i:s", mktime(date("H"), date("i"), date("s"), date("m"), date("d"), date("Y")));
     $tables = arraykeys2(fetchtablelist($tb_prefix), 'Name');
     if (mysql_get_server_info() > '4.1') {
         $db->query("set names '" . $dbcharset . "'");
     }
     $backupfilename = DATA_PATH . "backup_" . $backupdir . DS . str_replace(array('/', '\\', '.'), '', $filename);
     $sqldump = '';
     $tableid = 0;
     $startfrom = 0;
     for (; $tableid < count($tables); $tableid++) {
         $sqldump .= sqldumptable($tables[$tableid], $startfrom, strlen($sqldump));
         $startfrom = 0;
     }
     $dumpfile = $backupfilename . '.sql';
     $tableid--;
     if (trim($sqldump)) {
         $fp = file_put_contents($dumpfile, $sqldump);
开发者ID:renduples,项目名称:alibtob,代码行数:31,代码来源:db.php


示例2: getval

 $sqlcharset = getval('sqlcharset');
 $extendins = getval('extendins');
 $sqlcompat = getval('sqlcompat');
 $usehex = intval(getval('usehex'));
 $_SGLOBAL['db']->query('SET SQL_QUOTE_SHOW_CREATE=0', 'SILENT');
 //Error-free execution off the table and I create a column without quotes
 if (empty($filename) || strlen($filename) > 40) {
     //Determine the length of the file name
     cpmessage('documents_were_incorrect_length');
 } else {
     $filename = preg_replace("/[^a-z0-9_]/i", '', str_replace('.', '_', $filename));
 }
 $tables = array();
 // backup mode
 if ($type == 'uchomes') {
     $tables = arraykeys2(fetchtablelist($tablepre), 'Name');
 } elseif ($type == 'custom') {
     if (isset($_POST['setup'])) {
         //POST submit backup
         $tables = empty($_POST['customtables']) ? array() : $_POST['customtables'];
         data_set('custombackup', $tables);
     } else {
         //Jump backup automatically
         $tables = data_get('custombackup');
         $tables = unserialize($tables);
     }
 }
 if (empty($tables) || !is_array($tables)) {
     cpmessage('backup_table_wrong');
 }
 $time = sgmdate('Y-m-d H:i:s', $_SGLOBAL['timestamp']);
开发者ID:v998,项目名称:discuzx-en,代码行数:31,代码来源:admincp_backup.php


示例3: function_exists

\t\t</tr>
\t\t</table>
\t</td>
\t</tr>
\t</table>
END;
//备份
if ($op == 'export') {
    $shelldisabled = function_exists('shell_exec') ? '' : 'disabled';
    $zipdisplay = function_exists('gzcompress') ? '' : 'style="display:none"';
    $filename = date('ymd') . '_' . random(8);
    $dbversion = intval($_SGLOBAL['db']->version());
    $sqlcharsets = "<input class=\"radio\" type=\"radio\" name=\"sqlcharset\" value=\"\" checked> {$alang['customfield_title_isdefault']}" . ($dbcharset ? " &nbsp; <input class=\"radio\" type=\"radio\" name=\"sqlcharset\" value=\"{$dbcharset}\"> " . strtoupper($dbcharset) : '') . ($dbversion > '4.1' && $dbcharset != 'utf8' ? " &nbsp; <input class=\"radio\" type=\"radio\" name=\"sqlcharset\" value='utf8'> UTF-8</option>" : '');
    $tablelist = '';
    //取得SupeSite表
    $supe_tablelist = fetchtablelist($tablepre);
    $rowcount = 0;
    foreach ($supe_tablelist as $value) {
        $tablelist .= ($rowcount % 4 ? '' : '</tr><tr>') . "<td><input type='checkbox' name='customtables[]' value='{$value['Name']}' checked>{$value['Name']}</td>\n";
        $rowcount++;
    }
    $tablelist .= '</tr>';
    $formhash = formhash();
    print <<<END
\t<form method="post" action="{$theurl}&op=backupstart" enctype="multipart/form-data">
\t<input type="hidden" name="formhash" value="{$formhash}">
\t\t<table cellspacing="2" cellpadding="2" class="helptable"><tr><td>{$alang['database_export_help']}</td></tr></table>
\t\t<table cellspacing="0" cellpadding="0" width="100%"  class="maintable">
\t\t\t<tr>
\t\t\t\t<th><input type="radio" name="type" value="supesite" checked onclick="\$('showtables').style.display='none'">{$alang['supesite_all_database']}</th>
\t\t\t</tr>
开发者ID:hongz1125,项目名称:devil,代码行数:31,代码来源:admin_database.php


示例4: gmdate

<input class="button" type="submit" name="exportsubmit" value="<?=$lang['submit']?>"></center></form>
<?

	} else {

		$db->query('SET SQL_QUOTE_SHOW_CREATE=0', 'SILENT');

		if(!$filename || preg_match("/(\.)(exe|jsp|asp|aspx|cgi|fcgi|pl)(\.|$)/i", $filename)) {
			cpmsg('database_export_filename_invalid');
		}

		$time = gmdate("$dateformat $timeformat", $timestamp + $timeoffset * 3600);
		if($type == 'discuz') {
			$tables = arraykeys2(fetchtablelist($tablepre), 'Name');
		} elseif($type == 'discuzsupesite') {
			$tables = arraykeys2(array_merge(fetchtablelist($tablepre), ($supe['tablepre'] ? fetchtablelist($supe['tablepre']) : array())), 'Name');
		} elseif($type == 'custom') {
			$tables = array();
			if(empty($setup)) {
				if($tables = $db->fetch_first("SELECT value FROM {$tablepre}settings WHERE variable='custombackup'")) {
					$tables = unserialize($tables['value']);
				}
			} else {
				$customtables= array_merge(empty($customtables) ? array() : $customtables, empty($supetables) ? array() : $supetables);
				$customtablesnew = empty($customtables)? '' : addslashes(serialize($customtables));
				$db->query("REPLACE INTO {$tablepre}settings (variable, value) VALUES ('custombackup', '$customtablesnew')");
				$tables = & $customtables;
			}
			if( !is_array($tables) || empty($tables)) {
				cpmsg('database_export_custom_invalid');
			}
开发者ID:jonycookie,项目名称:projectm2,代码行数:31,代码来源:database.inc.php


示例5: sprintf

						$filename = sprintf($usezip == 2 ? $backupfilename."-%s".'.zip' : $dumpfile, $i);
						$filelist .= "<li><a href=\"$filename\">$filename\n";
					}
					cpmsg('恭喜您,全部 '.$volume.' 个备份文件成功创建,备份完成。<a href="'.$phpself.'?action='.$action.'">数据备份</a><ul>'.$filelist.'</ul>');
				}
			}

		}

	}

	$shelldisabled = function_exists('shell_exec') ? '' : 'disabled';
	$sqlcharsets = "<input class=\"radio\" type=\"radio\" name=\"sqlcharset\" value=\"\" checked> $lang[default]".($dbcharset ? " &nbsp; <input class=\"radio\" type=\"radio\" name=\"sqlcharset\" value=\"$dbcharset\"> ".strtoupper($dbcharset) : '').($db->version() > '4.1' && $dbcharset != 'utf8' ? " &nbsp; <input class=\"radio\" type=\"radio\" name=\"sqlcharset\" value='utf8'> UTF-8</option>" : '');

	$tablelist = "";
	$pnbak_tables = fetchtablelist('',1);
	foreach($pnbak_tables as $key => $tables){
		$rowcount =0;
		$tablelist .="<tr>\n\t<td colspan=\"4\"><b>".(empty($key)?"其它":$key)."数据表</b>&nbsp;&nbsp;<input type=\"checkbox\" name=\"chkall\" onclick=\"exportcheckall(this,'".(empty($key)?"other_":$key)."')\" class=\"checkbox\" checked> <b>全选</b></td>\n</tr>\n";
		$tablelist .= "<tbody id=\"".(empty($key)?"other_":$key)."\">";
		foreach($tables as $table) {
			$tablelist .= ($rowcount % 4 ? '' : "<tr>")."\n\t<td><input class=\"checkbox\" type=\"checkbox\" name=\"customtables[]\" value=\"$table[Name]\" checked> $table[Name]</td>".($rowcount % 4!=3 ? '' : "\n</tr>\n");
				$rowcount++;
		}
		$i = $rowcount%4==0?0:(4-$rowcount%4);
		for(; $i>0;$i--){
			$tablelist .= ($rowcount % 4 ? '' : "<tr>")."\n\t<td>&nbsp;</td>".($rowcount % 4!=3 ? '' : "\n</tr>\n");
			$rowcount++;
		}
		$tablelist .= "</tbody>";
	}
开发者ID:xl7dev,项目名称:WebShell,代码行数:31,代码来源:index.php



注:本文中的fetchtablelist函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP ffContainer函数代码示例发布时间:2022-05-15
下一篇:
PHP fetchinfo函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap