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


PHP loader_box函数代码示例

本文整理汇总了PHP中loader_box函数的典型用法代码示例。如果您正苦于以下问题:PHP loader_box函数的具体用法?PHP loader_box怎么用?PHP loader_box使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: _link

    function _link()
    {
        // display a button that pops up the boxchooser app
        static $included = false;
        if (!$included) {
            page_add_script(site_prefix() . '/js/dialog.js');
            page_add_script(loader_box('boxchooser/js', $this));
            $included = true;
        }
        return template_simple('
			<script language="javascript" type="text/javascript">

				function boxchooser_{name}_handler () {
					if (typeof dialogWin.returnedValue == \'object\') {
						url = dialogWin.returnedValue[\'src\'];
					} else {
						url = dialogWin.returnedValue;
					}
					boxchooser_{name}_form.elements[boxchooser_{name}_element].value = unescape (url);
				}

			</script>

			<input type="submit" onclick="boxchooser_{name}_get_file (this.form, \'{name}\'); return false" value="{intl Choose}" />
		', $this);
    }
开发者ID:vojtajina,项目名称:sitellite,代码行数:26,代码来源:Boxchooser.php

示例2: trigger

 /**
  * Triggers the services for the specified $transition.  Can be called
  * as a static method.  Returns a string of the concatenated output
  * from all of the services.
  *
  * @access public
  * @param string
  * @param array hash
  * @return string
  *
  */
 function trigger($transition = 'global', $data = array())
 {
     if (@file_exists('inc/app/cms/conf/services/' . $transition . '.php')) {
         $services = ini_parse('inc/app/cms/conf/services/' . $transition . '.php');
         if (!is_array($services)) {
             $services = array();
         }
     } else {
         $services = array();
     }
     if ($transition != 'global' && $transition != 'error' && @file_exists('inc/app/cms/conf/services/global.php')) {
         $s2 = ini_parse('inc/app/cms/conf/services/global.php');
         if (is_array($s2)) {
             $services = array_merge($services, $s2);
         }
     }
     $out = '';
     $data['transition'] = $transition;
     foreach ($services as $service => $info) {
         if (strpos($info['handler'], 'box:') === 0) {
             $out .= loader_box(trim(substr($info['handler'], 4)), $data, 'service');
         } elseif (strpos($info['handler'], 'form:') === 0) {
             $out .= loader_form(trim(substr($info['handler'], 5)), 'service');
         }
     }
     return $out;
 }
开发者ID:vojtajina,项目名称:sitellite,代码行数:38,代码来源:Workflow.php

示例3: onSubmit

 function onSubmit($vals)
 {
     loader_import('cms.Versioning.Rex');
     $collection = $vals['collection'];
     unset($vals['collection']);
     if (empty($collection)) {
         $collection = 'sitellite_page';
     }
     $return = $vals['_return'];
     unset($vals['_return']);
     $changelog = $vals['changelog'];
     unset($vals['changelog']);
     $rex = new Rex($collection);
     //$vals['sitellite_owner'] = session_username ();
     //$vals['sitellite_team'] = session_team ();
     unset($vals['submit_button']);
     unset($vals['tab1']);
     unset($vals['tab2']);
     unset($vals['tab3']);
     unset($vals['tab-end']);
     unset($vals['header_properties']);
     unset($vals['header_contact']);
     unset($vals['header_loc']);
     if ($vals['contact_url'] == 'http://') {
         $vals['contact_url'] = '';
     }
     if ($vals['loc_map'] == 'http://') {
         $vals['loc_map'] = '';
     }
     $res = $rex->create($vals, $changelog);
     if (isset($vals[$rex->key])) {
         $key = $vals[$rex->key];
     } elseif (!is_bool($res)) {
         $key = $res;
     } else {
         $key = 'Unknown';
     }
     if (!$res) {
         if (!$return) {
             $return = site_prefix() . '/index/cms-browse-action?collection=siteevent_event';
         }
         echo loader_box('cms/error', array('message' => $rex->error, 'collection' => $collection, 'key' => $key, 'action' => $method, 'data' => $vals, 'changelog' => $changelog, 'return' => $return));
     } else {
         loader_import('cms.Workflow');
         echo Workflow::trigger('add', array('collection' => $collection, 'key' => $key, 'data' => $vals, 'changelog' => intl_get('Item added.'), 'message' => 'Collection: ' . $collection . ', Item: ' . $key));
         session_set('sitellite_alert', intl_get('Your item has been created.'));
         if ($return) {
             header('Location: ' . $return);
             exit;
         }
     }
     header('Location: ' . site_prefix() . '/index/siteevent-app/id.' . $res);
     exit;
 }
开发者ID:vojtajina,项目名称:sitellite,代码行数:54,代码来源:index.php

示例4: onSubmit

 function onSubmit($vals)
 {
     page_add_script(site_prefix() . '/js/dialog.js');
     page_add_script(loader_box('boxchooser/js', $vals));
     echo '<script language="javascript" type="text/javascript">';
     echo 'boxchooser_' . $vals['name'] . '_select ("' . $vals['app'] . '/' . $vals['box'];
     $pre = '?';
     foreach ($this->_box_settings as $k => $v) {
         echo $pre . $k . '=' . urlencode($vals[$k]);
         $pre = '&';
     }
     echo '"); window.close (); </script>';
     //info ($vals);
 }
开发者ID:vojtajina,项目名称:sitellite,代码行数:14,代码来源:index.php

示例5: onSubmit

 function onSubmit($vals)
 {
     loader_import('cms.Versioning.Rex');
     $collection = $vals['collection'];
     unset($vals['collection']);
     if (empty($collection)) {
         $collection = 'sitellite_page';
     }
     $return = $vals['_return'];
     unset($vals['_return']);
     $changelog = $vals['changelog'];
     unset($vals['changelog']);
     $rex = new Rex($collection);
     //$vals['sitellite_owner'] = session_username ();
     //$vals['sitellite_team'] = session_team ();
     unset($vals['submit_button']);
     unset($vals['edit-top']);
     unset($vals['edit-middle']);
     unset($vals['edit-middle2']);
     unset($vals['edit-middle3']);
     unset($vals['edit-bottom']);
     unset($vals['cover_heading']);
     $vals['ts'] = date('YmdHis');
     $res = $rex->create($vals, $changelog);
     if (isset($vals[$rex->key])) {
         $key = $vals[$rex->key];
     } elseif (!is_bool($res)) {
         $key = $res;
     } else {
         $key = 'Unknown';
     }
     if (!$res) {
         if (!empty($return)) {
             $return = site_prefix() . '/index/cms-browse-action?collection=sitepresenter_presentation';
         }
         echo loader_box('cms/error', array('message' => $rex->error, 'collection' => $collection, 'key' => $key, 'action' => $method, 'data' => $vals, 'changelog' => $changelog, 'return' => $return));
     } else {
         loader_import('cms.Workflow');
         echo Workflow::trigger('add', array('collection' => $collection, 'key' => $key, 'data' => $vals, 'changelog' => intl_get('Item added.'), 'message' => 'Collection: ' . $collection . ', Item: ' . $key));
         session_set('sitellite_alert', intl_get('Your item has been created.'));
         //if ($return) {
         //	header ('Location: ' . $return);
         //	exit;
         //}
         header('Location: ' . site_prefix() . '/index/sitepresenter-slides-action/id.' . $res);
         exit;
     }
 }
开发者ID:vojtajina,项目名称:sitellite,代码行数:48,代码来源:index.php

示例6: onSubmit

 function onSubmit($vals)
 {
     loader_import('cms.Versioning.Rex');
     $rex = new Rex('siteglossary_term');
     $collection = $vals['collection'];
     unset($vals['collection']);
     if (empty($collection)) {
         $collection = 'sitellite_page';
     }
     $return = $vals['_return'];
     unset($vals['_return']);
     $changelog = $vals['changelog'];
     unset($vals['changelog']);
     unset($vals['section']);
     unset($vals['submit_button']);
     $res = $rex->create($vals, $changelog);
     if (isset($vals[$rex->key])) {
         $key = $vals[$rex->key];
     } elseif (!is_bool($res)) {
         $key = $res;
     } else {
         $key = 'Unknown';
     }
     if (!$res) {
         if (!$return) {
             $return = site_prefix() . '/index/siteglossary-app';
         }
         echo loader_box('cms/error', array('message' => $rex->error, 'collection' => $collection, 'key' => $key, 'action' => $method, 'data' => $vals, 'changelog' => $changelog, 'return' => $return));
     } else {
         loader_import('cms.Workflow');
         echo Workflow::trigger('add', array('collection' => $collection, 'key' => $key, 'data' => $vals, 'changelog' => intl_get('Item added.'), 'message' => 'Collection: ' . $collection . ', Item: ' . $key));
         session_set('sitellite_alert', intl_get('Your item has been created.'));
         if ($return) {
             header('Location: ' . $return);
             exit;
         }
     }
     header('Location: ' . site_prefix() . '/index/siteglossary-app#' . $vals['word']);
     exit;
 }
开发者ID:vojtajina,项目名称:sitellite,代码行数:40,代码来源:index.php

示例7: onSubmit

 function onSubmit($vals)
 {
     loader_import('cms.Versioning.Rex');
     $collection = $vals['_collection'];
     unset($vals['_collection']);
     if (empty($collection)) {
         $collection = 'sitellite_page';
     }
     $rex = new Rex($collection);
     // default: database, database
     unset($vals['submit_button']);
     $key = $vals['_key'];
     unset($vals['_key']);
     $return = $vals['_return'];
     unset($vals['_return']);
     $changelog = $vals['changelog'];
     unset($vals['changelog']);
     foreach ($vals as $k => $v) {
         if ($this->widgets[$k]->ignoreEmpty && empty($v)) {
             unset($vals[$k]);
         }
     }
     if (strpos($rex->key, ',') !== false) {
         $pkeys = preg_split('/, ?/', $rex->key);
         $pvals = explode('|', $key);
         $key = array();
         for ($i = 0; $i < count($pkeys); $i++) {
             $key[$pkeys[$i]] = $pvals[$i];
         }
     }
     $method = $rex->determineAction($key, $vals['sitellite_status']);
     if (!$method) {
         die($rex->error);
     }
     $res = $rex->{$method}($key, $vals, $changelog);
     if (!$res) {
         if (empty($return)) {
             $return = site_prefix() . '/index/cms-browse-action?collection=' . urlencode($collection);
         }
         echo loader_box('cms/error', array('message' => $rex->error, 'collection' => $collection, 'key' => $key, 'action' => $method, 'data' => $vals, 'changelog' => $changelog, 'return' => $return));
     } else {
         loader_import('cms.Workflow');
         echo Workflow::trigger('edit', array('collection' => $collection, 'key' => $key, 'action' => $method, 'data' => $vals, 'changelog' => $changelog, 'message' => 'Collection: ' . $collection . ', Item: ' . $key));
         session_set('sitellite_alert', intl_get('Your item has been saved.'));
         if (!empty($return)) {
             header('Location: ' . $return);
             exit;
         }
         if ($collection == 'sitellite_page') {
             header('Location: ' . site_prefix() . '/index/' . $key);
             exit;
         }
         header('Location: ' . site_prefix() . '/index/cms-browse-action?collection=' . urlencode($collection));
         exit;
     }
 }
开发者ID:vojtajina,项目名称:sitellite,代码行数:56,代码来源:index.php

示例8: onSubmit

 function onSubmit($vals)
 {
     loader_import('cms.Versioning.Rex');
     $collection = $vals['_collection'];
     unset($vals['_collection']);
     if (empty($collection)) {
         $collection = 'sitellite_page';
     }
     $key = $vals['_key'];
     unset($vals['_key']);
     $return = $vals['_return'];
     unset($vals['_return']);
     $changelog = $vals['changelog'];
     unset($vals['changelog']);
     if (is_object($vals['file'])) {
         $vals['body'] =& $vals['file'];
         unset($vals['file']);
     } else {
         unset($vals['file']);
     }
     if (!empty($vals['name'])) {
         $vals['name'] = $vals['folder'] . '/' . $vals['name'];
     } elseif ($this->isNewFolder($vals['folder'], $key)) {
         $vals['name'] = $vals['folder'] . '/' . basename($key);
     } elseif (is_object($vals['body'])) {
         $vals['name'] = $vals['folder'] . '/' . $vals['body']->name;
     } else {
         unset($vals['name']);
     }
     if (strpos($vals['name'], '/') === 0) {
         $vals['name'] = substr($vals['name'], 1);
     }
     unset($vals['folder']);
     $rex = new Rex($collection);
     unset($vals['submit_button']);
     unset($vals['tab1']);
     unset($vals['tab2']);
     unset($vals['tab3']);
     unset($vals['tab-end']);
     $method = $rex->determineAction($key, $vals['sitellite_status']);
     if (!$method) {
         die($rex->error);
     }
     $res = $rex->{$method}($key, $vals, $changelog);
     // remove lock when editing is finished
     lock_remove($collection, $key);
     if (!empty($return)) {
         $return = site_prefix() . '/index/cms-browse-action?collection=sitellite_filesystem';
     }
     if (!$res) {
         echo loader_box('cms/error', array('message' => $rex->error, 'collection' => $collection, 'key' => $key, 'action' => $method, 'data' => $vals, 'changelog' => $changelog, 'return' => $return));
     } else {
         loader_import('cms.Workflow');
         echo Workflow::trigger('edit', array('collection' => $collection, 'key' => $key, 'action' => $method, 'data' => $vals, 'changelog' => $changelog, 'message' => 'Collection: ' . $collection . ', Item: ' . $key));
         session_set('sitellite_alert', intl_get('Your item has been saved.'));
         if (!empty($return)) {
             header('Location: ' . $return);
             exit;
         }
         header('Location: ' . site_prefix() . '/index/cms-browse-action?collection=sitellite_filesystem');
         exit;
     }
 }
开发者ID:vojtajina,项目名称:sitellite,代码行数:63,代码来源:index.php

示例9: Pager

$pg = new Pager($cgi->offset, $limit);
$pg->url = site_current() . '?collection=' . urlencode($cgi->collection);
$res = $rex->getDeleted($limit, $cgi->offset, $acl);
if (!$res) {
    $res = array();
    $rex->total = 0;
}
$pg->total = $rex->total;
$res2 = array();
foreach ($res as $k => $v) {
    $res2[$v->{$rex->key}] = $v;
}
function pretty_date($date)
{
    loader_import('saf.Date');
    return Date::timestamp($date, 'M j, Y - g:ia');
}
$pg->setData($res2);
$pg->update();
//page_title (intl_get ('Browsing') . ': ' . $rex->info['Collection']['display']);
$data['collection_name'] = $rex->info['Collection']['display'];
$data['title_field'] = $rex->info['Collection']['title_field'];
if (!session_allowed('approved', 'w', 'status')) {
    $data['restore'] = false;
} else {
    $data['restore'] = true;
}
echo template_simple(CMS_JS_ALERT_MESSAGE, $GLOBALS['cgi']);
echo loader_box('cms/nav');
template_simple_register('pager', $pg);
echo template_simple('deleted_items.spt', $data);
开发者ID:vojtajina,项目名称:sitellite,代码行数:31,代码来源:index.php

示例10: loader_box

<?php

echo loader_box('siteinvoice/reminder');
开发者ID:vojtajina,项目名称:sitellite,代码行数:3,代码来源:index.php

示例11: intl_get

    if (isset($cgi->username)) {
        echo '<p>' . intl_get('Invalid password.  Please try again.') . '</p>';
    } else {
        echo '<p>' . intl_get('Please enter your username and password to enter.') . '</p>';
    }
    echo template_simple('<form method="post" action="{site/prefix}/index/sitellite-user-login-action">
		<input type="hidden" name="goto" value="upgrade-app" />
		<table cellpadding="5" border="0">
			<tr>
				<td>{intl Username}</td>
				<td><input type="text" name="username" /></td>
			</tr>
			<tr>
				<td>{intl Password}</td>
				<td><input type="password" name="password" /></td>
			</tr>
			<tr>
				<td>&nbsp;</td>
				<td><input type="submit" value="{intl Enter}" /></td>
			</tr>
		</table>
		</form>');
    return;
}
page_title(intl_get('Upgrade Utility'));
if (!isset($parameters['run'])) {
    echo template_simple('index.spt', $parameters);
    return;
}
echo loader_box('upgrade/' . upgrade_box(), $parameters);
开发者ID:vojtajina,项目名称:sitellite,代码行数:30,代码来源:index.php

示例12: loader_import

<?php

loader_import('multilingual.Translation');
loader_import('multilingual.Filters');
global $cgi;
if (!isset($cgi->_lang)) {
    page_title(intl_get('Select Language'));
    echo template_simple('select_lang.spt', multilingual_get_langs());
    return;
}
if (isset($rex->info['Collection']['translate'])) {
    list($call, $name) = explode(':', $rex->info['Collection']['translate']);
    if ($call == 'box') {
        echo loader_box($name);
    } elseif ($call == 'form') {
        echo loader_form($name);
    } else {
        echo loader_form($call);
    }
    return;
} else {
    class MultilingualTranslateForm extends MailForm
    {
        function MultilingualTranslateForm()
        {
            parent::MailForm();
            $this->autosave = true;
            global $page, $cgi, $intl;
            $intl->language = $cgi->_lang;
            $intl->charset = $intl->languages[$intl->language]['charset'];
            $this->extra = 'id="multilingual-translate-form"';
开发者ID:vojtajina,项目名称:sitellite,代码行数:31,代码来源:index.php

示例13: page_title

<?php

if (!session_admin()) {
    page_title(intl_get('DevNotes - Login'));
    if (isset($parameters['username'])) {
        echo '<p>' . intl_get('Invalid password.  Please try again.') . '</p>';
    } else {
        echo '<p>' . intl_get('Please enter your username and password to enter.') . '</p>';
    }
    echo loader_box('sitellite/user/login', array('goto' => 'devnotes-admin-action'));
    return;
}
loader_import('devnotes.DevNote');
$dn = new DevNote();
// list all apps
page_title('DevNotes - Admin Summary');
$apps = $dn->getApps();
echo template_simple('applist.spt', array('apps' => $apps));
开发者ID:vojtajina,项目名称:sitellite,代码行数:18,代码来源:index.php

示例14: template_simple

    $sep = $parameters['separator'];
    if ($page->id == $item->id) {
        $item->active .= ' id="active"';
        echo template_simple($template, $item);
        $item->id = $page->id;
    } else {
        $item->active = '';
        echo template_simple($template, $item);
    }
    if ($parameters['dropmenus'] == 'yes') {
        // drop menu
        $params = array('top' => $item->id, 'xpos' => $xpos[$count], 'ypos' => $ypos[$count]);
        if (isset($width[$count])) {
            $params['width'] = $width[$count];
        }
        if (isset($parameters['over'])) {
            $params['over'] = $parameters['over'];
        }
        if (isset($parameters['out'])) {
            $params['out'] = $parameters['out'];
        }
        if (isset($parameters['levels'])) {
            $params['levels'] = $parameters['levels'];
        }
        if (isset($parameters['bgcolor'])) {
            $params['bgcolor'] = $parameters['bgcolor'];
        }
        echo loader_box('sitellite/nav/dropmenu', $params);
    }
    $count++;
}
开发者ID:vojtajina,项目名称:sitellite,代码行数:31,代码来源:index.php

示例15: display

    /**
     * Returns the display HTML for this widget.  The optional
     * parameter determines whether or not to automatically display the widget
     * nicely, or whether to simply return the widget (for use in a template).
     * 
     * @access	public
     * @param	boolean	$generate_html
     * @return	string
     * 
     */
    function display($generate_html = 0)
    {
        $_inner = new MF_Widget_pagebrowser('MF_' . $this->name . '_INNER');
        //$_inner->nullable = $this->nullable;
        //$_inner->table = 'sitellite_page';
        //$_inner->primary_key = 'id';
        //$_inner->display_column = 'if(nav_title != "", nav_title, if(title != "", title, id))';
        //$_inner->ref_column = 'below_page';
        //$_inner->self_ref = true;
        //$_inner->addblank = true;
        $_inner->alt = intl_get('Internal');
        $_inner->data_value = $this->data_value_INNER;
        $_extern = new MF_Widget_text('MF_' . $this->name . '_EXTERN');
        $_extern->nullable = $this->nullable;
        $_extern->alt = intl_get('External');
        $_extern->data_value = $this->data_value_EXTERN;
        //$_inner->extra = $this->extra;
        $_extern->extra = $this->extra;
        $_page = new MF_Widget_hidden($this->name);
        if ($generate_html) {
            page_add_script(site_prefix() . '/js/dialog.js');
            page_add_script(loader_box('filechooser/js'));
            $data = $_page->display(0) . "\n";
            $data .= "\t<tr>\n\t\t<td class=\"label\" valign=\"top\"><label for=\"" . $this->name . '" id="' . $this->name . '-label" ' . $this->invalid() . '>' . template_simple($this->label_template, $this, '', true) . "</label></td>\n\t\t<td class=\"field\">" . '<table border="0" cellpadding="2" cellspacing="2"><tr><td>' . intl_get('Internal') . '</td><td>' . $_inner->display(0) . '</td></tr><td>' . intl_get('External') . '</td><td>' . $_extern->display(0);
            $data .= template_simple('
				<script language="javascript" type="text/javascript">

					function filechooser_handler () {
						if (typeof dialogWin.returnedValue == \'object\') {
							url = \'{site/prefix}\' + dialogWin.returnedValue[\'src\'];
						} else {
							url = \'{site/prefix}\' + dialogWin.returnedValue;
						}
						filechooser_form.elements[\'MF_\' + filechooser_element + \'_EXTERN\'].value = url;
					}

					var bookmark_form = false;
					var bookmark_element = false;
					dialogWin.scrollbars = \'yes\';
					dialogWin.resizable = \'yes\';
					function bookmark () {
						openDGDialog (
							\'{site/prefix}/index/xed-bookmarks-action\',
							400,
							300,
							bookmark_handler
						);
					}

					function bookmarks (f, e) {
						bookmark_form = f;
						bookmark_element = e;
						bookmark ();
						return false;
					}

					function bookmark_handler () {
						if (typeof dialogWin.returnedValue == \'object\') {
							url = dialogWin.returnedValue[\'src\'];
						} else {
							url = dialogWin.returnedValue;
						}
						bookmark_form.elements[\'MF_\' + bookmark_element + \'_EXTERN\'].value = url;
					}

				</script>

				<input type="submit" onclick="bookmarks (this.form, \'{name}\'); return false" value="{intl Bookmarks}" />
				<input type="submit" onclick="filechooser_get_file (this.form, \'{name}\'); return false" value="{intl Files}" />
			', $this);
            $data .= '</td></tr></table>' . "</td>\n\t</tr>\n";
        } else {
            $data = $_page->display(0);
            $data .= $_inner->display(0) . '<br />' . $_extern->display(0);
        }
        return $data;
    }
开发者ID:vojtajina,项目名称:sitellite,代码行数:87,代码来源:Linker.php


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