当前位置: 首页>>代码示例>>PHP>>正文


PHP template::render方法代码示例

本文整理汇总了PHP中template::render方法的典型用法代码示例。如果您正苦于以下问题:PHP template::render方法的具体用法?PHP template::render怎么用?PHP template::render使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在template的用法示例。


在下文中一共展示了template::render方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: flush

 /**
  * Flushes the rendered content to browser.
  *
  * @return	void
  */
 public function flush()
 {
     $content = $this->doc->moduleBody($this->pageRecord, $this->getDocHeaderButtons(), $this->getTemplateMarkers());
     // Renders the module page
     $content = $this->doc->render($GLOBALS['LANG']->getLL('title'), $content);
     $this->content = null;
     $this->doc = null;
     echo $content;
 }
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:14,代码来源:index.php

示例2: smarty_function_fileuploadcontrol

/**
 * Smarty {fileuploadcontrol} function plugin
 *
 * Type:     function<br>
 * Name:     fileuploadcontrol<br>
 * Purpose:  display a file upload control
 *
 * @param         $params
 * @param \Smarty $smarty
 */
function smarty_function_fileuploadcontrol($params, &$smarty)
{
    global $db;
    $files = $db->selectObjects('file', 'item_id="' . $params['id'] . '" AND item_type="' . $params['type'] . '"');
    $template = new template('cermi', '_main');
    $template->assign('files', $files);
    $template->assign('item_type', $params['type']);
    $template->assign('item_id', $params['id']);
    $html = $template->render();
    echo $html;
}
开发者ID:notzen,项目名称:exponent-cms,代码行数:21,代码来源:function.fileuploadcontrol.php

示例3: show

 public static function show($name = null)
 {
     $queues = expSession::get('flash');
     if (empty($name)) {
         $template = new template('common', '_msg_queue');
         $template->assign('queues', $queues);
         $html = $template->render();
         self::flushAllQueues();
     } elseif (!empty($queues[$name])) {
         $template = new template('common', '_msg_queue');
         $template->assign('queues', array($name => $queues[$name]));
         $html = $template->render();
         self::flushQueue($name);
     }
     return $html;
 }
开发者ID:notzen,项目名称:exponent-cms,代码行数:16,代码来源:expQueue.php

示例4: main


//.........这里部分代码省略.........
					window.location.href = URL+(T3_RETURN_URL?"&returnUrl="+T3_RETURN_URL:"");
					return false;
				}

				function setHighlight(id)	{	//
					top.fsMod.recentIds["web"]=id;
					top.fsMod.navFrameHighlightedID["web"]="pages"+id+"_"+top.fsMod.currentBank;	// For highlighting

					if (top.content && top.content.nav_frame && top.content.nav_frame.refresh_nav)	{
						top.content.nav_frame.refresh_nav();
					}
				}
				' . $this->doc->redirectUrls($listUrl) . '
				' . $dblist->CBfunctions() . '
				function editRecords(table,idList,addParams,CBflag)	{	//
					window.location.href="' . $BACK_PATH . 'alt_doc.php?returnUrl=' . rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI')) . '&edit["+table+"]["+idList+"]=edit"+addParams;
				}
				function editList(table,idList)	{	//
					var list="";

						// Checking how many is checked, how many is not
					var pointer=0;
					var pos = idList.indexOf(",");
					while (pos!=-1)	{
						if (cbValue(table+"|"+idList.substr(pointer,pos-pointer))) {
							list+=idList.substr(pointer,pos-pointer)+",";
						}
						pointer=pos+1;
						pos = idList.indexOf(",",pointer);
					}
					if (cbValue(table+"|"+idList.substr(pointer))) {
						list+=idList.substr(pointer)+",";
					}

					return list ? list : idList;
				}

				if (top.fsMod) top.fsMod.recentIds["web"] = ' . intval($this->id) . ';
			');
            // Setting up the context sensitive menu:
            $this->doc->getContextMenuCode();
        }
        // access
        // Begin to compile the whole page, starting out with page header:
        $this->body = '';
        $this->body .= '<form action="' . htmlspecialchars($dblist->listURL()) . '" method="post" name="dblistForm">';
        $this->body .= $dblist->HTMLcode;
        $this->body .= '<input type="hidden" name="cmd_table" /><input type="hidden" name="cmd" /></form>';
        // If a listing was produced, create the page footer with search form etc:
        if ($dblist->HTMLcode) {
            // Making field select box (when extended view for a single table is enabled):
            if ($dblist->table) {
                $this->body .= $dblist->fieldSelectBox($dblist->table);
            }
            // Adding checkbox options for extended listing and clipboard display:
            $this->body .= '

					<!--
						Listing options for extended view, clipboard and localization view
					-->
					<div id="typo3-listOptions">
						<form action="" method="post">';
            // Add "display bigControlPanel" checkbox:
            if ($this->modTSconfig['properties']['enableDisplayBigControlPanel'] === 'selectable') {
                $this->body .= t3lib_BEfunc::getFuncCheck($this->id, 'SET[bigControlPanel]', $this->MOD_SETTINGS['bigControlPanel'], '', $this->table ? '&table=' . $this->table : '', 'id="checkLargeControl"');
                $this->body .= '<label for="checkLargeControl">' . t3lib_BEfunc::wrapInHelp('xMOD_csh_corebe', 'list_options', $GLOBALS['LANG']->getLL('largeControl', TRUE)) . '</label><br />';
            }
            // Add "clipboard" checkbox:
            if ($this->modTSconfig['properties']['enableClipBoard'] === 'selectable') {
                if ($dblist->showClipboard) {
                    $this->body .= t3lib_BEfunc::getFuncCheck($this->id, 'SET[clipBoard]', $this->MOD_SETTINGS['clipBoard'], '', $this->table ? '&table=' . $this->table : '', 'id="checkShowClipBoard"');
                    $this->body .= '<label for="checkShowClipBoard">' . t3lib_BEfunc::wrapInHelp('xMOD_csh_corebe', 'list_options', $GLOBALS['LANG']->getLL('showClipBoard', TRUE)) . '</label><br />';
                }
            }
            // Add "localization view" checkbox:
            if ($this->modTSconfig['properties']['enableLocalizationView'] === 'selectable') {
                $this->body .= t3lib_BEfunc::getFuncCheck($this->id, 'SET[localization]', $this->MOD_SETTINGS['localization'], '', $this->table ? '&table=' . $this->table : '', 'id="checkLocalization"');
                $this->body .= '<label for="checkLocalization">' . t3lib_BEfunc::wrapInHelp('xMOD_csh_corebe', 'list_options', $GLOBALS['LANG']->getLL('localization', TRUE)) . '</label><br />';
            }
            $this->body .= '
						</form>
					</div>';
            // Printing clipboard if enabled:
            if ($this->MOD_SETTINGS['clipBoard'] && $dblist->showClipboard) {
                $this->body .= $dblist->clipObj->printClipboard();
            }
            // Search box:
            $sectionTitle = t3lib_BEfunc::wrapInHelp('xMOD_csh_corebe', 'list_searchbox', $LANG->sL('LLL:EXT:lang/locallang_core.php:labels.search', TRUE));
            $this->body .= $this->doc->section($sectionTitle, $dblist->getSearchBox(), FALSE, TRUE, FALSE, TRUE);
            // Display sys-notes, if any are found:
            $this->body .= $dblist->showSysNotesForPage();
        }
        // Setting up the buttons and markers for docheader
        $docHeaderButtons = $dblist->getButtons();
        $markers = array('CSH' => $docHeaderButtons['csh'], 'CONTENT' => $this->body);
        // Build the <body> for the module
        $this->content = $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers);
        // Renders the module page
        $this->content = $this->doc->render('DB list', $this->content);
    }
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:101,代码来源:index.php

示例5: main

    /**
     * Main function, creating the content for the access editing forms/listings
     *
     * @return	void
     */
    public function main()
    {
        global $BE_USER, $LANG;
        // Access check...
        // The page will show only if there is a valid page and if this page may be viewed by the user
        $this->pageinfo = t3lib_BEfunc::readPageAccess($this->id, $this->perms_clause);
        $access = is_array($this->pageinfo);
        // Checking access:
        if ($this->id && $access || $BE_USER->isAdmin() && !$this->id) {
            if ($BE_USER->isAdmin() && !$this->id) {
                $this->pageinfo = array('title' => '[root-level]', 'uid' => 0, 'pid' => 0);
            }
            // This decides if the editform can and will be drawn:
            $this->editingAllowed = $this->pageinfo['perms_userid'] == $BE_USER->user['uid'] || $BE_USER->isAdmin();
            $this->edit = $this->edit && $this->editingAllowed;
            // If $this->edit then these functions are called in the end of the page...
            if ($this->edit) {
                $this->doc->postCode .= $this->doc->wrapScriptTags('
					setCheck("check[perms_user]","data[pages][' . $this->id . '][perms_user]");
					setCheck("check[perms_group]","data[pages][' . $this->id . '][perms_group]");
					setCheck("check[perms_everybody]","data[pages][' . $this->id . '][perms_everybody]");
				');
            }
            // Draw the HTML page header.
            $this->content .= $this->doc->header($LANG->getLL('permissions') . ($this->edit ? ': ' . $LANG->getLL('Edit') : ''));
            $this->content .= $this->doc->spacer(5);
            $vContent = $this->doc->getVersionSelector($this->id, 1);
            if ($vContent) {
                $this->content .= $this->doc->section('', $vContent);
            }
            // Main function, branching out:
            if (!$this->edit) {
                $this->notEdit();
            } else {
                $this->doEdit();
            }
            $docHeaderButtons = $this->getButtons();
            $markers['CSH'] = $this->docHeaderButtons['csh'];
            $markers['FUNC_MENU'] = t3lib_BEfunc::getFuncMenu($this->id, 'SET[mode]', $this->MOD_SETTINGS['mode'], $this->MOD_MENU['mode']);
            $markers['CONTENT'] = $this->content;
            // Build the <body> for the module
            $this->content = $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers);
        } else {
            // If no access or if ID == zero
            $this->content = $this->doc->header($LANG->getLL('permissions'));
        }
        // Renders the module page
        $this->content = $this->doc->render($LANG->getLL('permissions'), $this->content);
    }
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:54,代码来源:index.php

示例6: render

 function render()
 {
     //debug
     $debug = $_REQUEST['debug'];
     // array
     //get the variables
     $domain_uuid = $this->domain_uuid;
     $device_template = $this->device_template;
     $template_dir = $this->template_dir;
     $mac = $this->mac;
     $file = $this->file;
     //get the device template
     if (strlen($_REQUEST['template']) > 0) {
         $device_template = $_REQUEST['template'];
         $search = array('..', '/./');
         $device_template = str_replace($search, "", $device_template);
         $device_template = str_replace('//', '/', $device_template);
     }
     //remove ../ and slashes in the file name
     $search = array('..', '/', '\\', '/./', '//');
     $file = str_replace($search, "", $file);
     //get the domain_name
     if (strlen($domain_name) == 0) {
         $sql = "SELECT domain_name FROM v_domains ";
         $sql .= "WHERE domain_uuid=:domain_uuid ";
         $prep_statement = $this->db->prepare(check_sql($sql));
         if ($prep_statement) {
             //use the prepared statement
             $prep_statement->bindParam(':domain_uuid', $domain_uuid);
             $prep_statement->execute();
             $row = $prep_statement->fetch();
             unset($prep_statement);
             //set the variables from values in the database
             $domain_name = $row["domain_name"];
         }
     }
     //build the provision array
     foreach ($_SESSION['provision'] as $key => $val) {
         if (strlen($val['var']) > 0) {
             $value = $val['var'];
         }
         if (strlen($val['text']) > 0) {
             $value = $val['text'];
         }
         $provision[$key] = $value;
     }
     //check to see if the mac_address exists in devices
     if (strlen($_REQUEST['user_id']) == 0 || strlen($_REQUEST['userid']) == 0) {
         if ($this->mac_exists($mac)) {
             //get the device_template
             if (strlen($device_template) == 0) {
                 $sql = "SELECT * FROM v_devices ";
                 $sql .= "WHERE device_mac_address=:mac ";
                 //$sql .= "WHERE device_mac_address= '$mac' ";
                 $prep_statement_2 = $this->db->prepare(check_sql($sql));
                 if ($prep_statement_2) {
                     //use the prepared statement
                     $prep_statement_2->bindParam(':mac', $mac);
                     $prep_statement_2->execute();
                     $row = $prep_statement_2->fetch();
                     //set the variables from values in the database
                     $device_uuid = $row["device_uuid"];
                     $device_label = $row["device_label"];
                     if (strlen($row["device_vendor"]) > 0) {
                         $device_vendor = strtolower($row["device_vendor"]);
                     }
                     $device_model = $row["device_model"];
                     $device_firmware_version = $row["device_firmware_version"];
                     $device_provision_enable = $row["device_provision_enable"];
                     $device_template = $row["device_template"];
                     $device_profile_uuid = $row["device_profile_uuid"];
                     $device_description = $row["device_description"];
                 }
             }
             //find a template that was defined on another phone and use that as the default.
             if (strlen($device_template) == 0) {
                 $sql = "SELECT * FROM v_devices ";
                 $sql .= "WHERE domain_uuid=:domain_uuid ";
                 $sql .= "limit 1 ";
                 $prep_statement_3 = $this->db->prepare(check_sql($sql));
                 if ($prep_statement_3) {
                     $prep_statement_3->bindParam(':domain_uuid', $domain_uuid);
                     $prep_statement_3->execute();
                     $row = $prep_statement_3->fetch();
                     $device_label = $row["device_label"];
                     $device_vendor = strtolower($row["device_vendor"]);
                     $device_model = $row["device_model"];
                     $device_firmware_version = $row["device_firmware_version"];
                     $device_provision_enable = $row["device_provision_enable"];
                     $device_template = $row["device_template"];
                     $device_profile_uuid = $row["device_profile_uuid"];
                     $device_description = $row["device_description"];
                 }
             }
         } else {
             //use the user_agent to pre-assign a template for 1-hit provisioning. Enter the a unique string to match in the user agent, and the template it should match.
             $template_list = array("Linksys/SPA-2102" => "linksys/spa2102", "Linksys/SPA-3102" => "linksys/spa3102", "Linksys/SPA-9212" => "linksys/spa921", "Cisco/SPA301" => "cisco/spa301", "Cisco/SPA301D" => "cisco/spa302d", "Cisco/SPA303" => "cisco/spa303", "Cisco/SPA501G" => "cisco/spa501g", "Cisco/SPA502G" => "cisco/spa502g", "Cisco/SPA504G" => "cisco/spa504g", "Cisco/SPA508G" => "cisco/spa508g", "Cisco/SPA509G" => "cisco/spa509g", "Cisco/SPA512G" => "cisco/spa512g", "Cisco/SPA514G" => "cisco/spa514g", "Cisco/SPA525G2" => "cisco/spa525g2", "snom300-SIP" => "snom/300", "snom320-SIP" => "snom/320", "snom360-SIP" => "snom/360", "snom370-SIP" => "snom/370", "snom820-SIP" => "snom/820", "snom-m3-SIP" => "snom/m3", "yealink SIP-T20" => "yealink/t20", "yealink SIP-T22" => "yealink/t22", "yealink SIP-T26" => "yealink/t26", "Yealink SIP-T32" => "yealink/t32", "HW GXP1450" => "grandstream/gxp1450", "HW GXP2124" => "grandstream/gxp2124", "HW GXV3140" => "grandstream/gxv3140", "HW GXV3175" => "grandstream/gxv3175", "Wget/1.11.3" => "konftel/kt300ip");
             foreach ($template_list as $key => $val) {
                 if (stripos($_SERVER['HTTP_USER_AGENT'], $key) !== false) {
                     $device_template = $val;
//.........这里部分代码省略.........
开发者ID:reliberate,项目名称:fusionpbx,代码行数:101,代码来源:provision.php

示例7: rand

} else {
    $newpass = '';
    for ($i = 0; $i < rand(12, 20); $i++) {
        $num = rand(48, 122);
        if ($num > 97 && $num < 122 || $num > 65 && $num < 90 || $num > 48 && $num < 57) {
            $newpass .= chr($num);
        } else {
            $i--;
        }
    }
    // Send message
    if (!defined('SYS_SMTP')) {
        require_once BASE . 'subsystems/smtp.php';
    }
    $e_template = new template('loginmodule', '_email_resetdone', $loc);
    $e_template->assign('newpass', $newpass);
    $msg = $e_template->render();
    if (!defined('SYS_USERS')) {
        require_once BASE . 'subsystems/users.php';
    }
    $u = exponent_users_getUserById($tok->uid);
    if (!exponent_smtp_mail($u->email, $i18n['from_name'] . ' <' . $i18n['from_email'] . '@' . HOSTNAME . '>', $i18n['title'], $msg)) {
        echo $i18n['smtp_error'];
    } else {
        // Save new password
        $u->password = md5($newpass);
        exponent_users_saveUser($u);
        $db->delete('passreset_token', 'uid=' . $tok->uid);
        echo $i18n['sent'];
    }
}
开发者ID:BackupTheBerlios,项目名称:exponentva-svn,代码行数:31,代码来源:resetpass_confirm.php

示例8: form

 function form($object)
 {
     global $user;
     pathos_lang_loadDictionary('standard', 'core');
     pathos_lang_loadDictionary('modules', 'calendarmodule');
     if (!defined('SYS_FORMS')) {
         require_once BASE . 'subsystems/forms.php';
     }
     pathos_forms_initialize();
     $form = new form();
     if (!isset($object->id)) {
         $object->title = '';
         $object->body = '';
         $object->eventdate = null;
         $object->eventdate->id = 0;
         $object->eventdate->date = time();
         $object->eventstart = time();
         $object->eventend = time() + 3600;
         $object->is_allday = 0;
         $object->is_recurring = 0;
     } else {
         $form->meta('id', $object->id);
     }
     $form->register('title', TR_CALENDARMODULE_TITLE, new textcontrol($object->title));
     $form->register('body', TR_CALENDARMODULE_BODY, new htmleditorcontrol($object->body));
     $form->register(null, '', new htmlcontrol('<hr size="1" />'));
     if ($object->is_recurring == 1) {
         $form->register(null, '', new htmlcontrol(TR_CALENDARMODULE_RECURMOVEWARNING, false));
     }
     $form->register('eventdate', TR_CALENDARMODULE_EVENTDATE, new popupdatetimecontrol($object->eventdate->date, '', false));
     $cb = new checkboxcontrol($object->is_allday, true);
     #Warning: when the box returns true, we have to switch off the time controls
     $cb->jsHooks = array('onClick' => 'pathos_forms_switch_time(\'eventstart\', this.form, this.checked ? false : true); pathos_forms_switch_time(\'eventend\',this.form, this.checked ? false : true);');
     $form->register('is_allday', TR_CALENDARMODULE_ISALLDAY, $cb);
     #Warning: when the box returns true, we have to switch off the time controls
     $form->register('eventstart', TR_CALENDARMODULE_EVENTSTART, new timeControl($object->eventstart, $object->is_allday ? false : true));
     $form->register('eventend', TR_CALENDARMODULE_EVENTEND, new timeControl($object->eventend, $object->is_allday ? false : true));
     if (!isset($object->id)) {
         $customctl = file_get_contents(BASE . 'modules/calendarmodule/form.part');
         $datectl = new popupdatetimecontrol($object->eventstart + 365 * 86400, '', false);
         $customctl = str_replace('%%UNTILDATEPICKER%%', $datectl->controlToHTML('untildate'), $customctl);
         $form->register('recur', TR_CALENDARMODULE_RECURRENCE, new customcontrol($customctl));
     } else {
         if ($object->is_recurring == 1) {
             // Edit applies to one or more...
             $template = new template('calendarmodule', '_recur_dates');
             global $db;
             $eventdates = $db->selectObjects('eventdate', 'event_id=' . $object->id);
             if (!defined('SYS_SORTING')) {
                 require_once BASE . 'subsystems/sorting.php';
             }
             if (!function_exists('pathos_sorting_byDateAscending')) {
                 function pathos_sorting_byDateAscending($a, $b)
                 {
                     return $a->date > $b->date ? 1 : -1;
                 }
             }
             usort($eventdates, 'pathos_sorting_byDateAscending');
             if (isset($object->eventdate)) {
                 $template->assign('checked_date', $object->eventdate);
             }
             $template->assign('dates', $eventdates);
             $form->register(null, '', new htmlcontrol('<hr size="1"/>' . TR_CALENDARMODULE_RECURRENCEWARNING));
             $form->register(null, '', new htmlcontrol('<table cellspacing="0" cellpadding="2" width="100%">' . $template->render() . '</table>'));
             $form->meta('date_id', $object->eventdate->id);
             // Will be 0 if we are creating.
         }
     }
     $form->register('submit', '', new buttongroupcontrol(TR_CORE_SAVE, '', TR_CORE_CANCEL));
     return $form;
 }
开发者ID:BackupTheBerlios,项目名称:exponentva-svn,代码行数:71,代码来源:calendar.php

示例9: header

<?php

ob_start();
session_start();
if (empty($_SESSION['user_id'])) {
    header("Location: ./login.php");
}
require_once "autoload.php";
require_once "config/server.conf.php";
require_once "reg.php";
$page = isset($_GET['page']) ? (int) $_GET['page'] : 1;
$db = new DB();
$user = new res_users($db);
$tpl = new template();
$groups = new res_groups($db);
$partner = new res_partner($db);
$pagination = new pagination();
$tpl->registries = json_decode(json_encode($Registry), FALSE);
$tpl->title = "ERP :: Dashboard";
$tpl->userLogin = $user->userName($_SESSION['user_id']);
echo $tpl->render("template/header.tpl");
echo $tpl->render("template/top_nav.tpl");
echo "<div class=\"container-fluid\">";
echo $tpl->render("template/form.tpl");
echo "</div>";
echo $tpl->render("template/footer.tpl");
开发者ID:anggagewor,项目名称:dashboard,代码行数:26,代码来源:form.php

示例10: array

 static function folder_get_category($type, $folder, $folders)
 {
     $where = array("ftype=@type@", "id!=@id@", $_SESSION["permission_sql_read"]);
     $vars = array("type" => $type, "id" => $folder);
     $rows = db_select("simple_sys_tree", "id", $where, "lft asc", "200", $vars);
     if (is_array($rows) and count($rows) > 0) {
         foreach ($rows as $key => $row) {
             $rows[$key]["path"] = modify::getpath($row["id"]);
         }
     }
     $tpl = new template();
     $tpl->items = $rows;
     $tpl->folder = $folder;
     $tpl->folders = $folders;
     $tpl->style = $_SESSION["theme"];
     return $tpl->render("templates/ajax_folder_categories.php");
 }
开发者ID:drognisep,项目名称:Simple-Groupware,代码行数:17,代码来源:ajax.php

示例11: form

 static function form($object)
 {
     global $user;
     $form = new form();
     if (!isset($object->id)) {
         $object->title = '';
         $object->body = '';
         $object->eventdate = null;
         $object->eventdate->id = 0;
         $object->eventdate->date = time();
         $object->eventstart = time();
         $object->eventend = time() + 3600;
         $object->is_allday = 0;
         $object->is_featured = 0;
         $object->is_recurring = 0;
     } else {
         $form->meta('id', $object->id);
     }
     $form->register('title', gt('Title'), new textcontrol($object->title));
     $form->register('body', gt('Body'), new htmleditorcontrol($object->body));
     $form->register(null, '', new htmlcontrol('<hr size="1" />'));
     if ($object->is_recurring == 1) {
         $form->register(null, '', new htmlcontrol(gt('Warning: If you change the date below, it will only affect this specific events.  All other changes can be applied to this and other events.'), false));
     }
     //$form->register('eventdate',gt('Event Date'),new popupdatetimecontrol($object->eventdate->date,'',false));
     $form->register('eventdate', gt('Event Date'), new yuicalendarcontrol($object->eventdate->date, '', false));
     $cb = new checkboxcontrol($object->is_allday, false);
     $cb->jsHooks = array('onclick' => 'exponent_forms_disable_datetime(\'eventstart\',this.form,this.checked); exponent_forms_disable_datetime(\'eventend\',this.form,this.checked);');
     $form->register('is_allday', gt('All Day Event'), $cb);
     $form->register('eventstart', gt('Start Time'), new datetimecontrol($object->eventstart, false));
     $form->register('eventend', gt('End Time'), new datetimecontrol($object->eventend, false));
     if (!isset($object->id)) {
         //			$customctl = file_get_contents(BASE.'framework/modules-1/calendarmodule/form.part');
         $custom = new formtemplate('forms/calendar', '_recurring');
         $customctl = $custom->render();
         //$datectl = new popupdatetimecontrol($object->eventstart+365*86400,'',false);
         $datectl = new yuicalendarcontrol($object->eventdate->date + 365 * 86400, '', false);
         $customctl = str_replace('%%UNTILDATEPICKER%%', $datectl->controlToHTML('untildate'), $customctl);
         $form->register('recur', gt('Recurrence'), new customcontrol($customctl));
     } else {
         if ($object->is_recurring == 1) {
             // Edit applies to one or more...
             $template = new template('calendarmodule', '_recur_dates');
             global $db;
             $eventdates = $db->selectObjects('eventdate', 'event_id=' . $object->id);
             $eventdates = expSorter::sort(array('array' => $eventdates, 'sortby' => 'date', 'order' => 'ASC'));
             if (isset($object->eventdate)) {
                 $template->assign('checked_date', $object->eventdate);
             }
             $template->assign('dates', $eventdates);
             $form->register(null, '', new htmlcontrol('<hr size="1"/>' . gt('This event is a recurring event, and occurs on the dates below.  Select which dates you wish to apply these edits to.')));
             $form->register(null, '', new htmlcontrol('<table cellspacing="0" cellpadding="2" width="100%" class="exp-skin-table">' . $template->render() . '</table>'));
             $form->meta('date_id', $object->eventdate->id);
             // Will be 0 if we are creating.
         }
     }
     $form->register('featured_header', '', new htmlcontrol('<h3>' . gt('Featured Event Info') . '</h3><hr size="1" />'));
     $form->register('is_featured', gt('Feature this event'), new checkboxcontrol($object->is_featured, false));
     /* Why was this even here?  No views have it. 6/23/09 Time to implement it - Maia*/
     // $form->register('image_header','',new htmlcontrol('<h3>'.gt('Upload Image File').'</h3><hr size="1" />'));
     // $form->register('file',gt('Upload Image'),new uploadcontrol());
     // $form->register('tag_header','',new htmlcontrol('<h3>'.gt('Tags').'</h3><hr size="1" />'));
     $form->register('submit', '', new buttongroupcontrol(gt('Save'), '', gt('Cancel')));
     return $form;
 }
开发者ID:notzen,项目名称:exponent-cms,代码行数:65,代码来源:calendar.php

示例12:

foreach ($sidemenus as $sidemenu) {
    $side[] = $groups->menuName($sidemenu);
}
//$tpl->side 	=	$side;
foreach ($side as $sm) {
    $nomer[] = $sm->id;
}
$tpl->side = $groups->sideMenu($nomer);
if (isset($_GET['idmenu'])) {
    $id_menu = $_GET['idmenu'];
    $null = null;
} else {
    $null = "ok";
    $id_menu = "null";
}
$tpl->idmenu = $id_menu;
/*
* END Menu
*/
echo $tpl->render("template/header.tpl");
echo $tpl->render("template/top_nav.tpl");
echo "<div class=\"container-fluid\">";
echo $tpl->render("template/sidebar.tpl");
if ($null != "ok") {
    $tpl->child = $groups->childMenu($id_menu);
    echo $tpl->render("template/menu_big.tpl");
} else {
    echo $tpl->render("template/index.tpl");
}
echo "</div>";
echo $tpl->render("template/footer.tpl");
开发者ID:anggagewor,项目名称:dashboard,代码行数:31,代码来源:index.php

示例13: show_table

                }
            }
        }
        $tpl->auto_complete = true;
    }
}
if ($code != "") {
    $content .= "<br/>&nbsp;" . t("{t}%s secs{/t}", number_format(microtime(true) - $start, 4));
    $content .= ", " . t("{t}%s M memory usage{/t}", number_format(memory_get_peak_usage(true) / 1048576, 2));
}
$tpl->title = $title;
$tpl->content = $content;
if (isset($_REQUEST["no_gui"])) {
    echo $content;
} else {
    echo $tpl->render("templates/console.php");
}
function show_table($data, $full_texts = false, $vertical = true)
{
    if (count($data) == 0) {
        return "";
    }
    $limit = Max(round(220 / count($data[0])), 20);
    if ($vertical) {
        $limit = 150;
    }
    $content = "<table border='0' cellpadding='0' cellspacing='0'>";
    if (!$vertical) {
        $content .= "<tr>";
        foreach (array_keys($data[0]) as $value) {
            if ($full_texts and strlen($value) > $limit) {
开发者ID:drognisep,项目名称:Simple-Groupware,代码行数:31,代码来源:console.php

示例14: die

/***** GET CONTENT *************************************************/
$modus_function = $modus . "_getContent";
if (function_exists($modus_function)) {
    $content = $modus_function();
} else {
    die('Unbekannter Modus');
}
/***** GET MENU *************************************************/
$menu = array();
foreach ($active_modules as $module) {
    $menu_function = $module['modus'] . "_getMenu";
    if (function_exists("{$menu_function}")) {
        $menu = array_merge($menu, $menu_function());
    }
}
$template->addVar('left_menu', $menu);
/***** GET SELECTORS ***********************************************/
$selectors = array();
foreach ($active_modules as $module) {
    $selector_function = $module['modus'] . "_getSelector";
    if (function_exists("{$selector_function}")) {
        $selectors[] = array('modus' => $module['modus'], 'item' => $selector_function());
    }
}
if (sizeof($selectors)) {
    $template->addVar('selectors', $selectors);
}
/***** FILL TEMPLATE ***********************************************/
$template->addVars(array('gfx' => GFX_PATH));
$template->render();
开发者ID:microlefes,项目名称:Game,代码行数:30,代码来源:index.php

示例15: or

# it and/or modify it under the terms of the GNU
# General Public License as published by the Free
# Software Foundation; either version 2 of the
# License, or (at your option) any later version.
#
# GPL: http://www.gnu.org/licenses/gpl.txt
#
##################################################
if (!defined("EXPONENT")) {
    exit("");
}
// Sanitize required _GET parameters
$_GET['id'] = intval($_GET['id']);
$_GET['datatype'] = preg_replace('/[^A-Za-z0-9_]/', '', $_GET['datatype']);
$object = $db->selectObject($_GET['datatype'] . "_wf_revision", "id=" . $_GET['id']);
$rloc = unserialize($object->location_data);
if (exponent_permissions_check("manage_approval", $rloc)) {
    // We need the module, in order to render the view correctly.
    $oloc = unserialize($object->location_data);
    $module = $oloc->mod;
    $template = new template($module, "_workflowview", $loc);
    $template->assign("item", $object);
    $view = $template->render();
    $t = new template("workflow", "_viewrevision", $loc);
    $t->assign("view", $view);
    $t->assign("back", exponent_flow_get());
    $t->assign("revision", $object);
    $t->output();
} else {
    echo SITE_403_HTML;
}
开发者ID:BackupTheBerlios,项目名称:exponentva-svn,代码行数:31,代码来源:revisions_viewrevision.php


注:本文中的template::render方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。