本文整理汇总了PHP中AMPSystem_Lookup类的典型用法代码示例。如果您正苦于以下问题:PHP AMPSystem_Lookup类的具体用法?PHP AMPSystem_Lookup怎么用?PHP AMPSystem_Lookup使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了AMPSystem_Lookup类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setDynamicValues
function setDynamicValues()
{
$this->setFieldValueSet('modin', AMPSystem_Lookup::instance('Forms'));
$this->setDefaultValue('from_email', AMP_SYSTEM_BLAST_EMAIL_SENDER);
$this->setDefaultValue('from_name', AMP_SYSTEM_BLAST_EMAIL_SENDER_NAME);
$this->setDefaultValue('replyto_email', AMP_SYSTEM_BLAST_EMAIL_SENDER);
}
示例2: Nav_List
function Nav_List(&$dbcon, $criteria = array())
{
// $source = new NavigationSet( $dbcon );
// $this->init( $source );
$this->init($this->_init_source($dbcon, $criteria));
$this->addLookup('modid', AMPSystem_Lookup::instance('tools'));
}
示例3: articleversionlist
function articleversionlist($id)
{
global $dbcon;
$get = $dbcon->Execute("select a.vid, DATE_FORMAT(a.updated, '%c/%e/%Y %H:%i ') as updated, a.enteredby, a.type from articles_version a where a.id = {$id}") or die($dbcon->ErrorMsg());
$names_lookup =& AMPSystem_Lookup::instance('users');
if ($get->Fields("vid")) {
?>
<h2>Version History</h2>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr class="intitle">
<td>Version Id </td>
<td>Last Updated </td>
<td>Updated By </td>
<td></td>
<td></td>
<td></td>
</tr>
<?php
while (!$get->EOF) {
?>
<tr>
<td><?php
echo $get->Fields("vid");
?>
</td>
<td><?php
echo $get->Fields("updated");
?>
</td>
<td><?php
if ($u_id = $get->Fields("enteredby")) {
echo $names_lookup[$u_id];
}
?>
</td>
<td><a href="../article.php?id=<?php
echo $id;
?>
&vid=<?php
echo $get->Fields("vid");
?>
&preview=1" target="_blank">View</a></td>
<td><a href="article_edit.php?vid=<?php
echo $get->Fields("vid");
?>
">Edit</a></td>
<td><a href="article_edit.php?restore=<?php
echo $get->Fields("vid");
?>
&id=<? echo $id;?>">Restore</a></td>
</tr>
<?php
$get->MoveNext();
}
?>
</table>
<?php
}
}
示例4: _register_options_dynamic
function _register_options_dynamic()
{
if (!$this->udm->admin) {
return;
}
$forms =& AMPSystem_Lookup::instance('forms');
$this->options['reg_modin']['values'] = array('' => 'None selected') + $forms;
}
示例5: setTool
function setTool($modid)
{
$module_names = AMPSystem_Lookup::instance('Modules');
$form_lookup = AMPSystem_Lookup::instance('FormsbyTool');
$this->title = isset($module_names[$modid]) ? $module_names[$modid] : false;
$this->form_id = isset($form_lookup[$modid]) ? $form_lookup[$modid] : false;
$this->modid = $modid;
}
示例6: Appointment_List
function Appointment_List(&$dbcon, $id = null)
{
$source = new AppointmentSet($dbcon);
$this->init($source);
$this->addLookup('action_id', AMPSystem_Lookup::instance('scheduleItemDesc'));
$this->addLookup('userdata_id', AMPSystem_Lookup::instance('userDataNames'));
$this->schedule_lookup = AMPSystem_Lookup::instance('schedulesByItem');
$this->column_callBacks = array('Schedule' => array('method' => array(&$this, '_getScheduleLink')));
}
示例7: ScheduleItem_List
function ScheduleItem_List(&$dbcon, $id = null)
{
$source =& new ScheduleItemSet($dbcon);
$this->init($source);
$this->addLookup('schedule_id', AMPSystem_Lookup::instance('scheduleNames'));
$this->addLookup('quantity', $this->getAppointmentCounts());
#$this->addTranslation( 'id', 'lookupParticipantCount');
$this->addTranslation('start_time', '_formatDate');
}
示例8: findByModin
function findByModin($modin)
{
require_once 'Modules/Petition/Lookups.inc.php';
$modin_lookup = AMPSystem_Lookup::instance('petitionsByModin');
if (!isset($modin_lookup[$modin])) {
return false;
}
return $modin_lookup[$modin];
}
示例9: adjust_AMPSystem_IntroText
function adjust_AMPSystem_IntroText($data, $type)
{
$tools_lookup = AMPSystem_Lookup::instance('toolsbyForm');
if (!isset($tools_lookup[AMP_FORM_ID_WEBACTION_DEFAULT])) {
return $data;
}
$data['modid'] = $tools_lookup[AMP_FORM_ID_WEBACTION_DEFAULT];
$data['name'] = 'Action ' . ucfirst($type) . ': ' . $data['title'];
return $data;
}
示例10: getOwnerEmail
function getOwnerEmail()
{
if (!($owner = $this->getOwnerId())) {
return false;
}
$emails = AMPSystem_Lookup::instance('userDataEmails');
if (!isset($emails[$owner])) {
return false;
}
return $emails[$owner];
}
示例11: AMP_display_nav_tag_cloud
function AMP_display_nav_tag_cloud()
{
$qty_set = AMPSystem_Lookup::instance('tagTotals');
if (!$qty_set) {
return false;
}
$source_item =& new AMP_Content_Tag(AMP_Registry::getDbcon());
$source = $source_item->find(array('live' => AMP_CONTENT_STATUS_LIVE));
$display = new AMP_Display_Cloud($source, $qty_set);
return $display->execute();
}
示例12: _updateColumn
function _updateColumn(&$source, $fieldname)
{
$renderer = $this->_getRenderer();
$user_name = false;
if ($editor_id = $source->getLastEditorId()) {
$user_names = AMPSystem_Lookup::instance('users');
$user_name = isset($user_names[$editor_id]) ? $user_names[$editor_id] : "";
$user_name = ' ' . AMP_TEXT_BY . ' ' . $user_name;
}
return $source->getItemDateChanged() . $user_name;
}
示例13: AMP_navCalendarSearchState
function AMP_navCalendarSearchState()
{
$renderer = new AMPDisplay_HTML();
$add_link = $renderer->link(AMP_CONTENT_URL_EVENT_ADD, 'Post an Event', array('class' => 'homeeventslink'));
$search_link = $renderer->link(AMP_CONTENT_URL_EVENT_SEARCH, 'Search Events', array('class' => 'homeeventslink'));
$state_values = AMPSystem_Lookup::instance('Regions_US');
$select_values = array('' => 'Select Your State');
if ($state_values) {
$select_values = $select_values + $state_values;
}
return $search_link . $renderer->newline() . '<form method="GET" action="' . AMP_CONTENT_URL_EVENT_LIST . '">' . AMP_buildSelect('state', $select_values, null, $renderer->makeAttributes(array('onChange' => 'if ( this.value != "") this.form.submit( );'))) . '<input name="search" value="Search" type="hidden">' . '</form>' . $renderer->newline() . $add_link . $renderer->newline();
}
示例14: _register_fields_dynamic
function _register_fields_dynamic()
{
$available_tags = AMPSystem_Lookup::instance('tags');
if (!$available_tags) {
return false;
}
$options = $this->getOptions();
$public_setting = isset($options['public']) && $options['public'];
$this->_active = $public_setting || $this->udm->admin;
$fields = array('tag_add' => array('type' => 'multiselect', 'size' => 12, 'label' => 'Select ' . ucfirst(AMP_pluralize(AMP_TEXT_TAG)), 'enabled' => true, 'public' => $public_setting, 'values' => $available_tags), 'tag_add_text' => array('type' => 'text', 'size' => 30, 'label' => 'Add ' . ucfirst(AMP_pluralize(AMP_TEXT_TAG)) . ' ( comma-separated )', 'enabled' => true, 'public' => $public_setting));
$this->fields =& $fields;
$this->insertAfterFieldOrder(array('tag_list', 'tag_add', 'tag_add_text'));
}
示例15: _sort_source
function _sort_source(&$source_items, $qty_set)
{
$sorted_order = array();
foreach ($source_items as $item_key => $item) {
if (!isset($qty_set[$item->id])) {
continue;
}
$sorted_order[$item_key] = $qty_set[$item->id];
}
$tag_names = AMPSystem_Lookup::instance('tags');
arsort($sorted_order);
if (count($sorted_order) > $this->_display_qty) {
$display_order = array();
foreach ($sorted_order as $item_id => $item_qty) {
$display_order[] = $item_id;
if (count($display_order) >= $this->_display_qty) {
break;
}
}
} else {
$display_order = array_keys($sorted_order);
}
$this->_items = array_combine_key($display_order, $source_items);
$this->_item_qtys = array_combine_key($display_order, $qty_set);
$this->max = $max_qty = max($this->_item_qtys);
$this->min = $min_qty = min($this->_item_qtys);
$this->step = $step_size = ($max_qty - $min_qty) / $this->_size_steps;
/*
foreach( $this->_items as $item_id => $item ) {
if ( !isset( $this->_item_qtys[$item->id])){
unset( $this->_items[ $item->id ]);
continue;
}
$this->_assign_class( $item->id, $this->_item_qtys[ $item->id ], $max_qty, $min_qty );
}
*/
$item_classes = array_map(array($this, '_map_class'), $this->_items);
reset($this->_items);
foreach ($item_classes as $key => $class) {
$item_id = key($this->_items);
if (!$class) {
unset($this->_items[$item_id]);
continue;
}
$this->_item_classes[$item_id] = $this->_css_class_base . $class;
next($this->_items);
}
$item->sort($this->_items);
}