当前位置: 首页>>代码示例>>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;未经允许,请勿转载。