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


PHP AMPSystem_Lookup::instance方法代码示例

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


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

示例1: 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'));
 }
开发者ID:radicaldesigns,项目名称:amp,代码行数:7,代码来源:List.inc.php

示例2: 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);
 }
开发者ID:radicaldesigns,项目名称:amp,代码行数:7,代码来源:Form.inc.php

示例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 
    }
}
开发者ID:radicaldesigns,项目名称:amp,代码行数:59,代码来源:versionfunctions.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;
 }
开发者ID:radicaldesigns,项目名称:amp,代码行数:8,代码来源:Save.inc.php

示例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;
 }
开发者ID:radicaldesigns,项目名称:amp,代码行数:8,代码来源:BaseTemplate.php

示例6: 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');
 }
开发者ID:radicalsuz,项目名称:amp,代码行数:9,代码来源:List.inc.php

示例7: 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')));
 }
开发者ID:radicaldesigns,项目名称:amp,代码行数:9,代码来源:List.inc.php

示例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];
 }
开发者ID:radicaldesigns,项目名称:amp,代码行数:9,代码来源:Petition.php

示例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;
 }
开发者ID:radicaldesigns,项目名称:amp,代码行数:10,代码来源:Deprecated.php

示例10: 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();
}
开发者ID:radicalsuz,项目名称:amp,代码行数:11,代码来源:Cloud.php

示例11: getOwnerEmail

 function getOwnerEmail()
 {
     if (!($owner = $this->getOwnerId())) {
         return false;
     }
     $emails = AMPSystem_Lookup::instance('userDataEmails');
     if (!isset($emails[$owner])) {
         return false;
     }
     return $emails[$owner];
 }
开发者ID:radicalsuz,项目名称:amp,代码行数:11,代码来源:Item.inc.php

示例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;
 }
开发者ID:radicaldesigns,项目名称:amp,代码行数:11,代码来源:List.inc.php

示例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();
}
开发者ID:radicaldesigns,项目名称:amp,代码行数:12,代码来源:nav.calendar.php

示例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'));
 }
开发者ID:radicaldesigns,项目名称:amp,代码行数:13,代码来源:Save.inc.php

示例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);
 }
开发者ID:radicaldesigns,项目名称:amp,代码行数:49,代码来源:Cloud.php


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