本文整理匯總了PHP中DatabaseManager::getCurrentTasks方法的典型用法代碼示例。如果您正苦於以下問題:PHP DatabaseManager::getCurrentTasks方法的具體用法?PHP DatabaseManager::getCurrentTasks怎麽用?PHP DatabaseManager::getCurrentTasks使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類DatabaseManager
的用法示例。
在下文中一共展示了DatabaseManager::getCurrentTasks方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: DatabaseManager
<?php
include_once 'DatabaseManager.class.php';
$action = $_GET['action'];
$databaseManager = new DatabaseManager();
switch ($action) {
case 'getCurrentTasks':
$databaseManager->getCurrentTasks();
break;
case 'getCompletedTasks':
$databaseManager->getCompletedTasks();
break;
case 'saveTasks':
$databaseManager->saveTask($_GET['tasks'], $_GET['due_date']);
break;
}
示例2: foreach
<div class="modal-body">
<input type="text" class="form-control" id="edit-input">
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" id="edit-button" data-dismiss="modal">Сохранить
изменения
</button>
</div>
</div>
</div>
</div>
</div>
<div class="container" id="task-list">
<ul class="list-group">
<?php
$rows = $database_manager->getCurrentTasks(false);
foreach ($rows as $key) {
foreach ($key as $k => $task) {
echo '<li class="li-checkbox"><input class="check" type="checkbox" style="margin-top:13px"></li><li class= "list-group-item" data-toggle="modal" data-target="#editModal">' . "{$task}" . '<span class="glyphicon glyphicon-remove"></span></li>';
}
}
?>
</ul>
</div>
</body>
</html>