本文整理汇总了PHP中xoops_cp_footer函数的典型用法代码示例。如果您正苦于以下问题:PHP xoops_cp_footer函数的具体用法?PHP xoops_cp_footer怎么用?PHP xoops_cp_footer使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了xoops_cp_footer函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: cache_view_files
function cache_view_files()
{
global $xoopsSecurity;
RMTemplate::get()->set_help('http://redmexico.com.mx/docs/xoops-booster/archivos-del-cache');
RMTemplate::get()->assign('xoops_pagetitle', __('Booster Zone', 'booster'));
RMTemplate::get()->add_style('cache.css', 'rmcommon', 'plugins/booster');
RMFunctions::create_toolbar();
xoops_cp_header();
$plugin = RMFunctions::get()->load_plugin('booster');
// Get files
$items = XoopsLists::getFileListAsArray(XOOPS_CACHE_PATH . '/booster/files');
$files = array();
$count_expired = 0;
foreach ($items as $file) {
$tmp = explode('.', $file);
if ($tmp[1] != 'meta') {
continue;
}
$content = json_decode(file_get_contents(XOOPS_CACHE_PATH . '/booster/files/' . $file), true);
$files[] = array('id' => $tmp[0], 'url' => $content['uri'], 'date' => formatTimestamp($content['created'], 'l'), 'time' => $content['created'], 'lang' => $content['language'], 'size' => filesize(XOOPS_CACHE_PATH . '/booster/files/' . $tmp[0] . '.html'));
$count_expired = time() - $content['created'] >= $plugin->get_config('time') ? $count_expired + 1 : $count_expired;
}
include RMTemplate::get()->get_template('cache_files.php', 'plugin', 'rmcommon', 'booster');
xoops_cp_footer();
}
开发者ID:laiello,项目名称:bitcero-modules,代码行数:25,代码来源:main.php
示例2: categoriesForm
function categoriesForm($edit = 0)
{
global $db, $xoopsModule;
if ($edit) {
$id = TCFunctions::get('id');
if ($id <= 0) {
redirectMsg('cats.php', __('¡El ID proporcionado no es válido!'), 1);
die;
}
$cat = new TCCategory($id);
if ($cat->isNew()) {
redirectMsg('cats.php', __('No existe la categoría especificada'), 1);
die;
}
}
xoops_cp_location("<a href='./'>" . $xoopsModule->name() . "</a> » <a href='./cats.php'>" . __('Administración de Categorías', 'admin_team') . "</a> » " . ($edit ? __('Editar Categoría', 'admin_team') : __('Crear Categoría', 'admin_team')));
xoops_cp_header();
$form = new RMForm($edit ? __('Editar Categoría', 'admin_team') : __('Crear Categoría', 'admin_team'), 'frmNew', 'cats.php');
$form->oddClass('oddForm');
$form->addElement(new RMFormText(__('Nombre', 'admin_team'), 'name', 50, 100, $edit ? $cat->name() : ''), true);
if ($edit) {
$form->addElement(new RMFormText(__('Nombre corto', 'admin_team'), 'nameid', 50, 100, $cat->nameId()));
}
$form->addElement(new RMFormTextArea(__('Descripción', 'admin_team'), 'desc', 5, 45, $edit ? $cat->getVar('desc') : ''));
$ele = new RMFormButtonGroup();
$ele->addButton('sbt', $edit ? __('Guardar Cambios', 'admin_team') : __('Crear Categoría', 'admin_team'), 'submit');
$ele->addButton('cancel', __('Cancelar', 'admin_team'), 'button', 'onclick="window.location=\'cats.php\';"');
$form->addElement($ele);
$form->addElement(new RMFormHidden('op', $edit ? 'saveedit' : 'save'));
if ($edit) {
$form->addElement(new RMFormHidden('id', $id));
}
$form->display();
xoops_cp_footer();
}
开发者ID:laiello,项目名称:bitcero-modules,代码行数:35,代码来源:cats.php
示例3: show_available_updates
function show_available_updates()
{
global $rmTpl, $rmEvents, $updfile, $xoopsSecurity;
$rmFunc = RMFunctions::get();
$rmUtil = RMUtilities::get();
$tf = new RMTimeFormatter('', '%T% %d%, %Y% at %h%:%i%');
if (is_file($updfile)) {
$updates = unserialize(base64_decode(file_get_contents($updfile)));
}
$rmTpl->add_style('updates.css', 'rmcommon');
$rmTpl->add_script('updates.js', 'rmcommon');
$rmTpl->add_head_script('var xoToken = "' . $xoopsSecurity->createToken() . '";');
$rmTpl->add_head_script('var langUpdated = "' . __('Item updated!', 'rmcommon') . '";');
$rmTpl->add_help(__('Updates Help', 'rmcommon'), 'http://www.xoopsmexico.net/docs/common-utilities/actualizaciones-automaticas/standalone/1/');
$ftpserver = parse_url(XOOPS_URL);
$ftpserver = $ftpserver['host'];
$pathinfo = parse_url(XOOPS_URL);
$ftpdir = str_replace($pathinfo['scheme'] . '://' . $pathinfo['host'], '', XOOPS_URL);
unset($pathinfo);
RMBreadCrumb::get()->add_crumb(__('Available Updates', 'rmcommon'));
$rmTpl->assign('xoops_pagetitle', __('Available Updates', 'rmcommon'));
xoops_cp_header();
include $rmTpl->get_template('rmc-updates.php', 'module', 'rmcommon');
xoops_cp_footer();
}
开发者ID:JustineBABY,项目名称:rmcommon,代码行数:25,代码来源:updates.php
示例4: system_images_error
/**
* @brief display error message & exit (Tentative)
*/
function system_images_error($message)
{
xoops_cp_header();
xoops_error($message);
xoops_cp_footer();
exit;
}
开发者ID:hiro1173,项目名称:legacy,代码行数:10,代码来源:main.php
示例5: edit_bookmark
/**
* @desc Muestra el formulario para agregar un nuevo sitio
*/
function edit_bookmark()
{
global $xoopsModule, $xoopsConfig, $xoopsSecurity, $rmTpl;
$id = rmc_server_var($_GET, 'id', 0);
if ($id <= 0) {
redirectMsg('bookmarks.php', __('Site ID not provided!', 'mywords'), 1);
die;
}
$book = new MWBookmark($id);
if ($book->isNew()) {
redirectMsg('bookmarks.php', __('Social site not exists!', 'mywords'), 1);
die;
}
$temp = XoopsLists::getImgListAsArray(XOOPS_ROOT_PATH . '/modules/mywords/images/icons');
foreach ($temp as $icon) {
$icons[] = array('url' => XOOPS_URL . "/modules/mywords/images/icons/{$icon}", 'name' => $icon);
}
MWFunctions::include_required_files();
RMBreadCrumb::get()->add_crumb(__('Social Sites', 'mywords'), 'bookmarks.php');
RMBreadCrumb::get()->add_crumb(__('Edit Site', 'mywords'));
xoops_cp_header();
$show_edit = true;
include $rmTpl->get_template('admin/mywords_bookmarks.php', 'module', 'mywords');
$rmTpl->assign('xoops_pagetitle', __('Edit Social Site', 'mywords'));
$rmTpl->add_script(RMCURL . '/include/js/jquery.checkboxes.js');
$rmTpl->add_script('../include/js/scripts.php?file=bookmarks.js');
xoops_cp_footer();
}
开发者ID:JustineBABY,项目名称:mywords,代码行数:31,代码来源:bookmarks.php
示例6: formLicences
/**
* @desc Formulario de licencias
**/
function formLicences($edit = 0)
{
global $xoopsModule;
$id = rmc_server_var($_REQUEST, 'id', 0);
if ($edit) {
//Verificamos si la licencia es válida
if ($id <= 0) {
redirectMsg('licenses.php', __('You must provide a valid licencse ID!', 'dtransport'), 1);
die;
}
//Verificamos si la licencia existe
$lc = new DTLicense($id);
if ($lc->isNew()) {
redirectMsg('licenses.php', __('Specified licence ID does not exists!', 'dtransport'), 1);
die;
}
}
xoops_cp_location("<a href='./'>" . $xoopsModule->name() . "</a> » " . ($edit ? __('Edit Licence', 'dtransport') : __('New Licence', 'dtransport')));
xoops_cp_header();
$form = new RMForm($edit ? __('Edit Licence', 'dtransport') : __('New Licence', 'dtransport'), 'frmlic', 'licenses.php');
$form->addElement(new RMFormText(__('Licence name', 'dtransport'), 'name', 50, 150, $edit ? $lc->name() : ''), true);
$form->addElement(new RMFormText(__('Licence reference URL', 'dtransport'), 'url', 50, 255, $edit ? $lc->link() : ''));
$ele = new RMFormSelect(__('Licence type', 'dtranport'), 'type');
$ele->addOption(0, __('Open source licence', 'dtransport'), $edit ? $lc->type() == 0 ? 1 : 0 : 0);
$ele->addOption(1, __('Restrictive licence', 'dtranport'), $edit ? $lc->type() == 1 ? 1 : 0 : 0);
$form->addElement($ele);
$form->addElement(new RMFormHidden('action', $edit ? 'saveedit' : 'save'));
$form->addElement(new RMFormHidden('id', $id));
$buttons = new RMFormButtonGroup();
$buttons->addButton('sbt', __('Save Changes', 'dtransport'), 'submit');
$buttons->addButton('cancel', __('Cancel', 'stransport'), 'button', 'onclick="window.location=\'licenses.php\';"');
$form->addElement($buttons);
$form->display();
xoops_cp_footer();
}
开发者ID:laiello,项目名称:bitcero-modules,代码行数:38,代码来源:licenses.php
示例7: module_admin_footer
function module_admin_footer($main = "", $n = "")
{
xoops_cp_header();
admin_toolbar($n);
echo "<link rel='stylesheet' type='text/css' media='screen' href='../module.css' />";
echo $main;
xoops_cp_footer();
}
开发者ID:prolin99,项目名称:mobile_view,代码行数:8,代码来源:tool_xoops.php
示例8: end
function end()
{
global $xoopsConfig, $xoopsModule;
if (!empty($this->mTemplate)) {
$this->mXoopsTpl->display($this->mTemplate);
}
xoops_cp_footer();
}
开发者ID:nobunobuta,项目名称:xoopscube_NBFrame,代码行数:8,代码来源:NBFrameAdminRender.class.php
示例9: formCoachs
function formCoachs($edit = 0)
{
global $xoopsModule, $db, $mc, $xoopsConfig;
if ($edit) {
$id = TCFunctions::get('id');
if ($id <= 0) {
redirectMsg('coachs.php', __('Id no válido', 'admin_team'), 1);
die;
}
$coach = new TCCoach($id);
if ($coach->isNew()) {
redirectMsg('coachs.php', __('El entrenador especificado no existe', 'admin_team'), 1);
die;
}
}
xoops_cp_location("<a href='./'>" . $xoopsModule->name() . "</a> » <a href='./coachs.php'>" . __('Entrenadores', 'admin_team') . "</a> » " . ($edit ? __('Editar entrenador', 'admin_team') : __('Crear entrenador', 'admin_team')));
$cHead = '<link href="' . TC_URL . '/styles/admin.css" media="all" rel="stylesheet" type="text/css" />';
xoops_cp_header($cHead);
$form = new RMForm($edit ? __('Editar Entrenador', 'admin_team') : __('Crear Entrenador', 'admin_team'), 'frmNew', 'coachs.php', 'post');
$form->oddClass('oddForm');
$form->setExtra('enctype="multipart/form-data"');
$form->addElement(new RMFormText(__('Nombre', 'admin_team'), 'name', 50, 150, $edit ? $coach->name() : ''), true);
if ($edit) {
$form->addElement(new RMFormText(__('Nombre corto', 'admin_team'), 'nameid', 50, 150, $coach->nameId()));
}
$form->addElement(new RMFormText(__('Cargo', 'admin_team'), 'role', 50, 150, $edit ? $coach->role() : ''), true);
$form->addElement(new RMFormFile(__('Imagen', 'admin_team'), 'image', 45, $mc['filesize'] * 1024));
if ($edit && $coach->image() != '') {
$form->addElement(new RMFormLabel(__('Imagen actual', 'admin_team'), "<img src='" . XOOPS_URL . "/uploads/teams/coachs/ths/" . $coach->image() . "' alt='' />"));
}
$form->addElement(new RMFormEditor(__('Biografía', 'admin_team'), 'bio', '90%', '300px', $edit ? $coach->bio('e') : ''));
$form->addElement(new RMFormSubTitle(__('Equipos', 'admin_team'), 1));
$ele = new RMFormCheck(__('Seleccionar equipos', 'admin_team'));
$ele->asTable(3);
$sql = "SELECT * FROM " . $db->prefix("coach_teams") . " ORDER BY name";
$result = $db->query($sql);
if ($edit) {
$teams = $coach->teams(false);
}
while ($row = $db->fetchArray($result)) {
$team = new TCTeam();
$team->assignVars($row);
$cat =& $team->category(true);
$ele->addOption($team->name() . " <span class='coachNameCat'>(" . $cat->name() . ")</span>", 'teams[]', $team->id(), $edit ? in_array($team->id(), $teams) ? 1 : 0 : 0);
}
$form->addElement($ele);
$ele = new RMFormButtonGroup();
$ele->addButton('sbt', __('Enviar', 'admin_team'), 'submit');
$ele->addButton('cancel', __('Cancelar', 'admin_team'), 'button', 'onclick="window.location=\'coachs.php\';"');
$form->addElement($ele);
$form->addElement(new RMFormHidden('op', $edit ? 'saveedit' : 'save'));
if ($edit) {
$form->addElement(new RMFormHidden('id', $id));
}
$form->display();
xoops_cp_footer();
}
开发者ID:laiello,项目名称:bitcero-modules,代码行数:57,代码来源:coachs.php
示例10: Choice
function Choice()
{
global $xoopsModule;
xoops_cp_header();
OpenTable();
echo "<a href='" . XOOPS_URL . "/modules/system/admin.php?fct=preferences&op=showmod&mod=" . $xoopsModule->getVar('mid') . "'>" . _IMP_Edit . "</a><br />";
CloseTable();
xoops_cp_footer();
}
开发者ID:BackupTheBerlios,项目名称:haxoo-svn,代码行数:9,代码来源:index.php
示例11: error_halt
function error_halt($msg)
{
global $xoopsLogger;
xoops_cp_header();
include './mymenu.php';
echo $xoopsLogger->dumpQueries();
OpenTable();
echo $msg;
CloseTable();
xoops_cp_footer();
}
开发者ID:BackupTheBerlios,项目名称:peakxoops-svn,代码行数:11,代码来源:maintenance.php
示例12: dispatch
function dispatch()
{
require XSNS_FRAMEWORK_DIR.'/global.php';
xoops_cp_header();
include $mytrustdirpath.'/mymenu.php';
echo "<h4><p style='text-align:center;'>"._AM_XSNS_TITLE_ACCESS_LOG."</p></h4>";
$access_log = $this->context->getAttribute('access_log');
if(count($access_log) > 0){
$pager = $this->context->getAttribute('pager');
echo "<div style='width:90%;margin-left:auto;margin-right:auto;'>";
echo "<table class='outer' style='width:100%;'>";
$header_list = array(
_AM_XSNS_ACCESS_DATE,
_AM_XSNS_ACCESS_COMMU,
_AM_XSNS_ACCESS_USER,
);
$header_count = count($header_list);
$pager_html = $this->getPageSelector($pager, $header_count);
echo $pager_html;
echo "<tr>";
foreach($header_list as $header){
echo "<th style='text-align:center;'>".$header."</th>";
}
echo "</tr>";
echo "<colgroup style='text-align:center; width:20%;'></colgroup>".
"<colgroup span='2' style='text-align:left; width:35%;'></colgroup>";
foreach($access_log as $access){
echo "<tr class='even'>".
"<td>".date('Y-m-d H:i:s', $access['time'])."</td>".
"<td><a href='index.php?".XSNS_ACTION_ARG."=access&cid=".$access['commu_id']."'>".$access['commu_name']."</a></td>".
"<td><a href='index.php?".XSNS_ACTION_ARG."=access&uid=".$access['member_id']."'>".$access['member_name']."</a></td>".
"</tr>";
}
echo $pager_html;
echo "</table>";
echo "</div>";
}
xoops_cp_footer();
}
开发者ID:nunoluciano,项目名称:uxcl,代码行数:53,代码来源:accessView.php
示例13: altsys_mylangadmin_errordie
function altsys_mylangadmin_errordie($target_mname, $message4disp)
{
xoops_cp_header();
altsys_include_mymenu();
$breadcrumbsObj =& AltsysBreadcrumbs::getInstance();
$breadcrumbsObj->appendPath(XOOPS_URL . '/modules/altsys/admin/index.php?mode=admin&lib=altsys&page=mylangadmin', _MI_ALTSYS_MENU_MYLANGADMIN);
$breadcrumbsObj->appendPath('', $target_mname);
echo '<h3>' . _MYLANGADMIN_H3_MODULE . ' : ' . $target_mname . '</h3>';
echo '<p>' . $message4disp . '</p>';
xoops_cp_footer();
exit;
}
开发者ID:hiro1173,项目名称:legacy,代码行数:12,代码来源:lang_functions.php
示例14: ShowServs
function ShowServs()
{
global $xoopsDB;
include 'functions.php';
$result = $xoopsDB->query("SELECT * FROM {$tvensrv} ORDER BY id_srv");
xoops_cp_header();
ShowNav();
echo "<table width='100%' class='outer' cellspacing='1'>\n\t\t\t<tr><th colspan='4'>" . _AM_SERVS_LIST . "</th></tr>";
while ($row = $xoopsDB->fetchArray($result)) {
echo "<tr class='even'><td align='left'>\n\t\t\t <a href='promos.php?op=view&idp={$row['id_promo']}'>" . ServiceName($row['id_srv']) . "</a></td>\n\t\t\t <td align='center'>" . date("d/m/Y h:i:s", $row['fecha']) . "</td>\n\t\t\t <td align='center'>{$row['buyermail']}</td>\n\t\t\t <td align='center'><a href='sales.php?op=promos&action=del'>" . _AM_DELETE . "</a></td>\n\t\t\t </tr>";
}
echo "</table>";
xoops_cp_footer();
}
开发者ID:BackupTheBerlios,项目名称:soopa,代码行数:14,代码来源:sales.php
示例15: show_dashboard
function show_dashboard()
{
global $xoopsModule;
//RMFunctions::create_toolbar();
$db = XoopsDatabaseFactory::getDatabaseConnection();
$sql = 'SELECT * FROM ' . $db->prefix('modules');
$result = $db->query($sql);
$installed_mods = array();
while ($row = $db->fetchArray($result)) {
$installed_mods[] = $row['dirname'];
}
require_once XOOPS_ROOT_PATH . "/class/xoopslists.php";
$dirlist = XoopsLists::getModulesList();
$available_mods = array();
$module_handler =& xoops_gethandler('module');
$i = 0;
foreach ($dirlist as $file) {
if ($i > 5) {
break;
}
clearstatcache();
$file = trim($file);
if (!in_array($file, $installed_mods)) {
$module =& $module_handler->create();
if (!$module->loadInfo($file, false)) {
continue;
}
$available_mods[] = $module;
}
$i++;
}
$donateButton = '<form id="paypal-form" name="_xclick" action="https://www.paypal.com/fr/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="[email protected]">
<input type="hidden" name="item_name" value="Common Utilities Support">
<input type="hidden" name="amount" value=0>
<input type="hidden" name="currency_code" value="USD">
<img src="https://www.paypal.com/en_US/i/btn/btn_donate_LG.gif" onclick="$(\'#paypal-form\').submit()" alt="PayPal - The safer, easier way to pay online!" />
</form>';
$installed_modules = get_modules_list();
xoops_cp_header();
RMTemplate::get()->add_style('dashboard.css', 'rmcommon');
RMTemplate::get()->add_script('dashboard.js', 'rmcommon', array('footer' => 1));
RMTemplate::get()->add_style('pagenav.css', 'rmcommon');
RMTemplate::get()->add_help(__('Dashboard Help', 'rmcommon'), 'http://www.xoopsmexico.net/docs/common-utilities/uso-de-common-utilities/standalone/1/#dashboard');
include RMTemplate::get()->get_template('rmc-dashboard.php', 'module', 'rmcommon');
xoops_cp_footer();
}
开发者ID:JustineBABY,项目名称:rmcommon,代码行数:48,代码来源:index.php
示例16: m_categories_form
/**
* Show the form to edit or create a category
* @param int edit
*/
function m_categories_form($edit = 0)
{
global $mc, $xoopsModule, $db;
MCHFunctions::toolbar();
RMTemplate::get()->assign('xoops_pagetitle', $edit ? __('Edit Category', 'match') : __('Add Category', 'match'));
xoops_cp_location('<a href="./">' . $xoopsModule->name() . "</a> » \n <a href='categories.php'>" . __('Categories', 'match') . '</a> » ' . ($edit ? __('Edit Category', 'match') : __('Add Category', 'match')));
xoops_cp_header();
$id = rmc_server_var($_REQUEST, 'id', 0);
if ($edit) {
//Verificamos si la categoría es válida
if ($id <= 0) {
redirectMsg('./categories.php', __('Provide a category ID!', 'match'), 1);
die;
}
//Verificamos si la categoría existe
$cat = new MCHCategory($id);
if ($cat->isNew()) {
redirectMsg('./categories.php', __('Specified category was not found!', 'match'), 1);
die;
}
}
$form = new RMForm($edit ? __('Edit Category', 'match') : __('Add Category', 'match'), 'frmNew', 'categories.php');
$form->addElement(new RMFormText(__('Name', 'match'), 'name', 50, 150, $edit ? $cat->getVar('name') : ''), true);
if ($edit) {
$form->addElement(new RMFormText(__('Short name', 'match'), 'nameid', 50, 150, $cat->getVar('nameid')), true);
}
$form->addElement(new RMFormEditor(__('Description', 'match'), 'desc', '100%', '250px', $edit ? $cat->getVar('description', 'e') : ''));
$sel_cats = new RMFormSelect(__('Parent category:', 'match'), 'parent', 0, $edit ? $cat->getVar('parent') : 0);
$categories = array();
MCHFunctions::categories_tree($categories, 0, 0, true, $edit ? $cat->id() : 0, '`name` ASC');
$sel_cats->addOption(0, __('Select category...', 'match'), $edit ? $cat->getVar('parent') == 0 ? 1 : 0 : 1);
foreach ($categories as $catego) {
$sel_cats->addOption($catego['id'], str_repeat('—', $catego['indent']) . ' ' . $catego['name']);
}
$form->addElement($sel_cats);
$form->addElement(new RMFormYesNo(__('Enable category', 'match'), 'active', $edit ? $cat->getVar('active') : 1));
$form->addElement(new RMFormHidden('action', $edit ? 'saveedit' : 'save'));
if ($edit) {
$form->addElement(new RMFormHidden('id', $cat->id()));
}
$ele = new RMFormButtonGroup();
$ele->addButton('sbt', $edit ? __('Save Changes!', 'match') : __('Add Now!', 'match'), 'submit');
$ele->addButton('cancel', _CANCEL, 'button', 'onclick="window.location=\'categos.php\';"');
$form->addElement($ele);
$form = RMEvents::get()->run_event('match.form.categories', $form);
$form->display();
xoops_cp_footer();
}
开发者ID:laiello,项目名称:bitcero-modules,代码行数:52,代码来源:categories.php
示例17: rd_show_page
function rd_show_page()
{
RMTemplate::get()->assign('xoops_pagetitle', __('Home Page', 'docs'));
xoops_cp_header();
include_once RMCPATH . '/class/form.class.php';
$content = @file_get_contents(XOOPS_CACHE_PATH . '/rd_homepage.html');
$content = TextCleaner::getInstance()->to_display($content);
$editor = new RMFormEditor('', 'homepage', '100%', '450px', $content);
$rmc_config = RMFunctions::configs();
if ($rmc_config['editor_type'] == 'tiny') {
$tiny = TinyEditor::getInstance();
$tiny->add_config('theme_advanced_buttons1', 'res_index');
}
include RMEvents::get()->run_event('docs.get.homepage.template', RMTemplate::get()->get_template('admin/rd_homepage.php', 'module', 'docs'));
xoops_cp_footer();
}
开发者ID:laiello,项目名称:bitcero-modules,代码行数:16,代码来源:hpage.php
示例18: formTypes
/**
* @desc Formulario de creación/edición de Tipos de cliente
**/
function formTypes($edit = 0)
{
global $tpl, $xoopsModule;
$ids = isset($_REQUEST['ids']) ? $_REQUEST['ids'] : 0;
if ($edit) {
//Verificamos si nos proporcionaron al menos un tipo para editar
if (!is_array($ids)) {
redirectMsg('./types.php', __('You must provide a type ID at least', 'works'), 1);
die;
}
if (!is_array($ids)) {
$ids = array($ids);
}
}
PWFunctions::toolbar();
xoops_cp_location('<a href="./">' . $xoopsModule->name() . "</a> » <a href='./types.php'>" . __('Customer types', 'works') . "</a> » " . ($edit ? __('Edit type', 'works') : __('New type', 'works')));
RMTemplate::get()->assign('xoops_pagetitle', __('Add Customers types', 'works'));
xoops_cp_header();
$form = new RMForm($edit ? __('Edit Type', 'works') : __('New Type', 'works'), 'frmtype', 'types.php');
$num = 10;
if ($edit) {
foreach ($ids as $k) {
//Verificamos si el tipo es válido
if ($k <= 0) {
continue;
}
//Verificamos si el tipo existe
$type = new PWType($k);
if ($type->isNew()) {
continue;
}
$form->addElement(new RMFormText(__('Type name', 'works'), 'type[' . $type->id() . ']', 50, 100, $edit ? $type->type() : ''));
}
} else {
for ($i = 1; $i <= $num; $i++) {
$form->addElement(new RMFormText(__('Type name', 'works'), 'type[' . $i . ']', 50, 100, $edit ? '' : ''));
}
}
$form->addElement(new RMFormHidden('op', $edit ? 'saveedit' : 'save'));
$ele = new RMFormButtonGroup();
$ele->addButton('sbt', $edit ? __('Save Changes', 'works') : __('Save Customer Types', 'works'), 'submit');
$ele->addButton('cancel', __('Cancel', 'works'), 'button', 'onclick="window.location=\'types.php\';"');
$form->addElement($ele);
$form->display();
xoops_cp_footer();
}
开发者ID:laiello,项目名称:bitcero-modules,代码行数:49,代码来源:types.php
示例19: xt_show_menus
function xt_show_menus()
{
global $xtAssembler, $xtFunctions;
$tc = TextCleaner::getInstance();
$menus = $xtAssembler->rootMenus();
if (!$menus) {
redirectMsg('themes.php', __('This theme does not support xThemes menus!', 'xthemes'), RMMSG_WARN);
}
$theme_menu = $xtAssembler->menu();
$tpl = RMTemplate::get();
$tpl->add_local_script('jquery.nestedSortable.js', 'xthemes');
$tpl->add_local_script('json_encode.js', 'xthemes');
$tpl->add_head_script("var lang_delete = '" . __('Do you really want to delete selected menu?', 'xthemes') . "';");
$tpl->add_local_script('xthemes.js', 'xthemes');
$tpl->assign('xoops_pagetitle', __('Theme menus', 'xthemes'));
xoops_cp_header();
include $tpl->get_template('xt_navigation.php', 'module', 'xthemes');
xoops_cp_footer();
}
开发者ID:arab4domin,项目名称:xthemes,代码行数:19,代码来源:navigation.php
示例20: show_dashboard
function show_dashboard()
{
global $xoopsModuleConfig;
$db = Database::getInstance();
// Sets count
$sql = "SELECT COUNT(*) FROM " . $db->prefix("gs_sets");
list($set_count) = $db->fetchRow($db->query($sql));
// Pictures count
$sql = "SELECT COUNT(*) FROM " . $db->prefix("gs_images");
list($pic_count) = $db->fetchRow($db->query($sql));
// Users count
$sql = "SELECT COUNT(*) FROM " . $db->prefix("gs_users");
list($user_count) = $db->fetchRow($db->query($sql));
// Tags count
$sql = "SELECT COUNT(*) FROM " . $db->prefix("gs_tags");
list($tag_count) = $db->fetchRow($db->query($sql));
// E-Cards count
$sql = "SELECT COUNT(*) FROM " . $db->prefix("gs_postcards");
list($post_count) = $db->fetchRow($db->query($sql));
// Used space
$space = RMUtilities::formatBytesSize(GSFunctions::folderSize($xoopsModuleConfig['storedir']));
// Number of files
$file_count = count_files(rtrim($xoopsModuleConfig['storedir'], '/'));
// First picture
$sql = "SELECT * FROM " . $db->prefix("gs_images") . " ORDER BY `created` ASC LIMIT 0,1";
$result = $db->query($sql);
if ($db->getRowsNum($result) > 0) {
$img = new GSImage();
$img->assignVars($db->fetchArray($result));
$user = new GSUser($img->owner(), 1);
$tf = new RMTimeFormatter(0, '%M% %d%, %Y%');
$first_pic['date'] = $tf->format($img->created());
$first_pic['link'] = $user->userURL() . ($xoopsModuleConfig['urlmode'] ? 'img/' . $img->id() . '/set/' : '&img=' . $img->id());
}
xoops_cp_header();
GSFunctions::toolbar();
RMTemplate::get()->add_style('dashboard.css', 'galleries');
RMTemplate::get()->add_style('admin.css', 'galleries');
RMTemplate::get()->add_head('<script type="text/javascript">var xurl = "' . XOOPS_URL . '";</script>');
RMTemplate::get()->add_local_script('dashboard.js', 'galleries');
include RMTemplate::get()->get_template('admin/gs_dashboard.php', 'module', 'galleries');
xoops_cp_footer();
}
开发者ID:laiello,项目名称:bitcero-modules,代码行数:43,代码来源:index.php
注:本文中的xoops_cp_footer函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论