本文整理汇总了PHP中admin::getDateSelectOptions方法的典型用法代码示例。如果您正苦于以下问题:PHP admin::getDateSelectOptions方法的具体用法?PHP admin::getDateSelectOptions怎么用?PHP admin::getDateSelectOptions使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类admin
的用法示例。
在下文中一共展示了admin::getDateSelectOptions方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: edit
function edit()
{
$db = new sql();
$db->connect();
$res = $db->query("select * from news where id=" . $this->id);
$data = $db->fetch_array($res);
$data["text"] = htmlspecialchars($data["text"]);
$select = admin::getDateSelectOptions($data["time"]);
$chid = $this->chid;
$action = "appendEdit";
$header = "Редактирование";
eval("\$content=\"" . admin::template("newsAdd", "FORMPOST", array("fields[title]" => "EXISTS")) . "\";");
$this->elements["content"] = $content;
}
示例2: wrongAdd
function wrongAdd()
{
session_start();
if ($_SESSION["fields"]) {
foreach ($_SESSION["wrongFields"] as $key => $value) {
$message .= "<p class=\"error\">" . $value . "</p>";
}
$data = $_SESSION["fields"];
$select = admin::getDateSelectOptions($data["time"]);
$chid = $this->chid;
$action = "appendAdd";
$db = new sql();
$db->connect();
$res = $db->query("select * from types order by id");
while ($data1 = $db->fetch_array($res)) {
$i++;
$types .= "<option" . ($data["type"] == $data1["id"] ? " selected" : "") . " value=\"{$data1['id']}\">{$data1['title']}</option>";
}
$ts[$data["type"]] = " selected";
$true = $data["type"] == 4 ? " && true" : " && false";
$data = $_SESSION["fields"];
$header = "Добавление";
$lid = $this->lid;
$library["chid"] = admin::getTypeID("library");
eval("\$content=\"" . admin::template("itemAdd", "FORMPOST", array("fields[title]" => "EXISTS", "fields[url]" => "EXISTS")) . "\";");
$this->elements["content"] = $content;
}
}
示例3: edit
function edit()
{
$db = new sql();
$db->connect();
$res = $db->query("select * from library where id=" . $this->id);
$data = $db->fetch_array($res);
$data["text"] = htmlspecialchars($data["text"]);
$select = admin::getDateSelectOptions($data["time"]);
$chid = $this->chid;
$action = "appendEdit";
$id = '<tr>
<td>№</td>
<td><input maxlength="14" name="fields[id]" size="14" value="' . $this->id . '" readonly="readonly" style="width: auto;" value="' . $this->id . '"></td>
</tr>';
$res1 = $db->query("select library_authors.* from library_authors left join authors on library_authors.author=authors.id where library=" . $this->id . " order by firstname, secondname, lastname");
$idSel = 0;
while ($data1 = $db->fetch_array($res1)) {
$curSel = $data1["author"];
eval("\$authorsSel.=\"" . admin::template("authorsJSscr") . "\";");
$idSel++;
}
$curSel = 0;
eval("\$authorsSel.=\"" . admin::template("authorsJSscr") . "\";");
$header = "Редактирование";
$page = "&page=" . $this->page;
eval("\$content=\"" . admin::template("libraryAdd", "FORMPOST", array("fields[name]" => "EXISTS")) . "\";");
$this->elements["content"] = $content;
}