本文整理汇总了PHP中task::GET方法的典型用法代码示例。如果您正苦于以下问题:PHP task::GET方法的具体用法?PHP task::GET怎么用?PHP task::GET使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类task
的用法示例。
在下文中一共展示了task::GET方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
<?php
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
task::UPDATE($url[2], $_POST['date'], $_POST['name'], $_POST['descr']);
}
$current = task::GET($url[2]);
//Kint::dump($current);
echo "<a href='/Calenda/?link=task/view/{$url['2']}'>View</a>";
?>
<form method="post">
date: <input id="datetimepicker" type="text" name="date">
<script type="text/javascript">jQuery('#datetimepicker').datetimepicker({
value:'<?php
$current->date;
?>
',
step:30,
inline: true,
format:'Y-m-d H:i:s'
});</script>
name: <input type="text" name="name" value="<?php
echo $current->name;
?>
">
descr: <input type="text" name="descr" value="<?php
echo $current->descr;
?>
">
示例2: explode
<!-- http://xdsoft.net/jquery-plugins/demo/datetimepicker/ -->
<script type="text/javascript" src="js/datetimepicker/jquery.js"></script>
<script type="text/javascript" src="js/datetimepicker/jquery.datetimepicker.js"></script>
<link type="text/css" rel="stylesheet" href="js/datetimepicker/jquery.datetimepicker.css">
</head>
<body>
<header style="float:left; width:100%;"><ul id="site-menu">
<li><a href="/Calenda"><i> Calenda </i></a></li>
<li><a href="?link=/task"> tasks </a></li>
</ul></header>
<?php
$url = explode("/", trim($_GET["link"], '/'));
echo "<h1>Calenda</h1>";
//Kint::dump($url);
if ($url[0] == "task") {
if (sizeof($url) == 1 || $url[1] == "index") {
task::printArray(task::GETALL());
} elseif ($url[1] == "view") {
task::printOne(task::GET($url[2]));
} elseif ($url[1] == "edit") {
require "view/task/edit.php";
}
}
?>
</body>
示例3:
<?php
$current = task::GET($args['id']);
//Kint::dump($current);
?>
<form method="post">
Задание: <input type="text" name="name" value="<?php
echo $current->name;
?>
">
Описание:<br><script src="/js/ckeditor/ckeditor.js"></script>
<textarea name="description"><?php
echo $current->description;
?>
</textarea>
<script type="text/javascript">
CKEDITOR.replace('description',
{
filebrowserBrowseUrl : '/js/fileman/index.html',
filebrowserImageBrowseUrl: '/js/fileman/index.html?type=image',
});
</script><br>
Поручено: <input id="datetimepicker" type="text" name="deadlineDate">
<script type="text/javascript">jQuery('#datetimepicker').datetimepicker({
value:'<?php
if (!is_null($current->id)) {
echo DateTime::createFromFormat("M d Y h:i:s:uA", $current->deadlineDate)->format("Y-m-d H:i:s");
} else {