當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Dashboard::createDashboard方法代碼示例

本文整理匯總了PHP中Dashboard::createDashboard方法的典型用法代碼示例。如果您正苦於以下問題:PHP Dashboard::createDashboard方法的具體用法?PHP Dashboard::createDashboard怎麽用?PHP Dashboard::createDashboard使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Dashboard的用法示例。


在下文中一共展示了Dashboard::createDashboard方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: Date

     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     GNU Lesser General Public License for more details.
     
     You should have received a copy of the GNU Lesser General Public License
     along with Dragoon.  If not, see <http://www.gnu.org/licenses/>.
*/
//require "../www/db-login.php";
//require "../www/error-handler.php";
set_time_limit(30000);
include "createDashboard.php";
date_default_timezone_set('America/Phoenix');
!empty($_REQUEST["fromDate"]) ? $fromDate = $_REQUEST["fromDate"] : ($fromDate = Date("Y-m-d"));
!empty($_REQUEST["toDate"]) ? $toDate = $_REQUEST["toDate"] : '';
!empty($_REQUEST["fromTime"]) ? $fromTime = $_REQUEST["fromTime"] : ($fromTime = '15:00:000');
!empty($_REQUEST["toTime"]) ? $toTime = $_REQUEST["toTime"] : ($toTime = '16:15:000');
!empty($_REQUEST["section"]) ? $section = $_REQUEST["section"] : ($section = 'sos-326-spring14');
!empty($_REQUEST["mode"]) ? $mode = $_REQUEST["mode"] : ($mode = 'STUDENT');
!empty($_REQUEST["user"]) ? $user = $_REQUEST["user"] : ($user = '');
!empty($_REQUEST["dashboard"]) && $_REQUEST["dashboard"] === 'small' ? $smallDashboard = true : ($smallDashboard = false);
$mysqli = mysqli_connect("localhost", $dbuser, $dbpass, $dbname) or die("Connection not established. Check the user log file");
//$mysqli = mysqli_connect("localhost", "root", "qwerty211", "laits_stable14") or die("Connection not established. Check the user log file");
$db = new Dashboard($mysqli);
if ($smallDashboard) {
    $db->createSmallDashboard($section, $mode, $fromDate, $toDate, $fromTime, $toTime, $user);
} else {
    $db->createDashboard($section, $mode, $fromDate, $toDate, $fromTime, $toTime, $user);
}
mysqli_close($mysqli);
?>
</body>
</html>
開發者ID:GroundwaterGo,項目名稱:LaitsV3,代碼行數:31,代碼來源:dashboard.php

示例2: json_encode

     Dragoon is distributed in the hope that it will be useful,
     but WITHOUT ANY WARRANTY; without even the implied warranty of
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     GNU Lesser General Public License for more details.
     
     You should have received a copy of the GNU Lesser General Public License
     along with Dragoon.  If not, see <http://www.gnu.org/licenses/>.
*/
require "../www/db-login.php";
require "../www/error-handler.php";
set_time_limit(30000);
include "createDashboard_js.php";
date_default_timezone_set('America/Phoenix');
!empty($_REQUEST["fd"]) ? $fromDate = $_REQUEST["fd"] : ($fromDate = '');
!empty($_REQUEST["td"]) ? $toDate = $_REQUEST["td"] : ($toDate = '');
!empty($_REQUEST["ft"]) ? $fromTime = $_REQUEST["ft"] : ($fromTime = '');
!empty($_REQUEST["tt"]) ? $toTime = $_REQUEST["tt"] : ($toTime = '');
!empty($_REQUEST["s"]) ? $section = $_REQUEST["s"] : ($section = 'login.html');
!empty($_REQUEST["m"]) ? $mode = $_REQUEST["m"] : ($mode = 'STUDENT');
!empty($_REQUEST["u"]) ? $user = $_REQUEST["u"] : ($user = '');
!empty($_REQUEST["p"]) ? $sproblem = $_REQUEST["p"] : ($sproblem = '');
$problem = strlen($sproblem) > 30 ? substr($sproblem, 0, 30) : $sproblem;
!empty($_REQUEST["db_name"]) ? $dbname = $_REQUEST["db_name"] : '';
!empty($_REQUEST["db_user"]) ? $dbuser = $_REQUEST["db_user"] : '';
!empty($_REQUEST["db_name"]) ? $dbpass = $_REQUEST["db_password"] : '';
$mysqli = mysqli_connect("localhost", $dbuser, $dbpass, $dbname) or die("Connection not established. Check the user log file");
//$mysqli = mysqli_connect("localhost", "root", "qwerty211", "laits_cpi") or die("Connection not established. Check the user log file");
$db = new Dashboard($mysqli);
$resultObjects = $db->createDashboard($section, $mode, $user, $problem, $fromDate, $toDate, $fromTime, $toTime);
print json_encode($resultObjects);
mysqli_close($mysqli);
開發者ID:vanlehn,項目名稱:LaitsV3,代碼行數:31,代碼來源:dashboard_js.php


注:本文中的Dashboard::createDashboard方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。