コード例 #1
0
ファイル: index.php プロジェクト: MonsieurRb/gridstuff
require_once "E:\\wamp\\www\\classes\\BundleClass.php";
require_once "E:\\wamp\\www\\classes\\GridClass.php";
require_once "E:\\wamp\\www\\functions.inc.php";
$smarty = new Smarty();
$smarty->setTemplateDir('E:\\wamp\\bin\\smarty\\smarty\\templates');
$smarty->setCompileDir('E:\\wamp\\bin\\smarty\\smarty\\templates_c');
$smarty->setCacheDir('E:\\wamp\\bin\\smarty\\smarty\\cache');
$smarty->setConfigDir('E:\\wamp\\bin\\smarty\\smarty\\configs');
$id_employee = 2;
$bundles = array();
for ($i = 1; $i <= 6; $i++) {
    $name = 'pluginN' . $i;
    $bundles[] = $name();
}
if (is_file('conf/conf_' . $id_employee . '.json')) {
    $json_gridster = file_get_contents('conf/conf_' . $id_employee . '.json');
} else {
    if (is_file('conf/conf_' . $id_employee . '.json')) {
        /* Use the default json */
        $json_gridster = file_get_contents('conf/default.json');
    } else {
        /* Create default json */
        GridClass::createDefaultGrid($bundles, 'conf/default.json');
        $json_gridster = file_get_contents('conf/default.json');
    }
}
$grid = new GridClass($json_gridster);
$smarty->assign('grid', $grid->getGrid());
$smarty->assign('id_employee', $id_employee);
$smarty->assign('bundles', $bundles);
$smarty->display('views/menu.html');
コード例 #2
0
 public function addCteType($arrRow)
 {
     $return = parent::addCteType($arrRow);
     $return = GridClass::addClassesToLabels($arrRow, $return);
     return $return;
 }
コード例 #3
0
 public function listFormFields($arrRow)
 {
     $return = parent::listFormFields($arrRow);
     $return = GridClass::addClassesToLabels($arrRow, $return);
     return $return;
 }