本文整理汇总了PHP中boostrap_form::time_to_date方法的典型用法代码示例。如果您正苦于以下问题:PHP boostrap_form::time_to_date方法的具体用法?PHP boostrap_form::time_to_date怎么用?PHP boostrap_form::time_to_date使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类boostrap_form
的用法示例。
在下文中一共展示了boostrap_form::time_to_date方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: category_search
function category_search()
{
$t = time();
ini_set('display_errors', 1);
ini_set('error_prepend_string', "<p class=text-error>");
ini_set('error_append_string', "</p>\n");
$q = new mysql_squid_builder();
$users = new usersMenus();
$boot = new boostrap_form();
$page = CurrentPageName();
$tpl = new templates();
$ORDER = $boot->TableOrder(array("pattern" => "ASC"));
$searchstring = string_to_flexquery("category-search");
$table = $q->cat_totablename($_GET["category"]);
$sql = "SELECT * FROM `{$table}` WHERE 1 {$searchstring} ORDER BY {$ORDER} LIMIT 0,250";
$results = $q->QUERY_SQL($sql);
if (!$q->ok) {
echo "<p class=text-error>{$q->mysql_error}<hr>{$sql}</p>\n";
}
$tr = array();
while ($ligne = mysql_fetch_array($results, MYSQL_ASSOC)) {
$date = $boot->time_to_date(strtotime($ligne['zDate']), true);
$md5 = md5(serialize($ligne));
$pattern = $ligne["pattern"];
$delete = imgsimple("delete-32.png", null, "Delete{$t}('{$pattern}','{$md5}')");
$tr[] = "\n\t\t<tr id='{$md5}'>\n\t\t<td style='font-size:18px' nowrap width=1% nowrap>{$date}</td>\n\t\t<td style='font-size:18px' nowrap >{$pattern}</td>\n\t\t<td style='font-size:18px' nowrap width=1% >{$delete}</td>\n\t\t</tr>";
}
echo $boot->TableCompile(array("zDate" => "{date}", "pattern" => "{sitename}", "delete" => "{delete}"), $tr) . "\n\t\t\t\t\t\n<script>\nvar id{$t}='';\n\tvar xDelete{$t}= function (obj) {\n\t\tvar res=obj.responseText;\n\t\tif (res.length>3){alert(res);return;}\n\t\t\$('#'+id{$t}).remove();\n\t\t\n\t}\n\nfunction Delete{$t}(www,md){\n\tid{$t}=md;\n\tvar XHR = new XHRConnection();\n\tXHR.appendData('www-delete',www);\n\tXHR.appendData('category','{$_GET["category"]}');\n\tXHR.sendAndLoad('{$page}', 'POST',xDelete{$t});\t\t\n}\n</script>";
}