• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP AMPSystem_Lookup类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



在下文中一共展示了AMPSystem_Lookup类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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);
 }
开发者ID:radicaldesigns,项目名称:amp,代码行数:7,代码来源:Form.inc.php


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


示例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');
 }
开发者ID:radicalsuz,项目名称: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: 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


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


示例16: _setSortTagname

 function _setSortTagname(&$source)
 {
     $names_lookup =& AMPSystem_Lookup::instance('tags');
     $order = array_keys($names_lookup);
     $translate_set = array();
     foreach ($item_set as $item_id => $item) {
         $tag_id = $item->getTag();
         if (!$tag_id) {
             continue;
         }
         $translate_set[$tag_id] = $item_id;
     }
     $ordered_set = array_combine_key($order, $translate_set);
     $item_set = array_combine_key($ordered_set, $item_set);
 }
开发者ID:radicaldesigns,项目名称:amp,代码行数:15,代码来源:Tags.php


示例17: execute

 function execute($options = array())
 {
     $options = array_merge($this->getOptions(), $options);
     if (!isset($options['_userid'])) {
         return false;
     }
     $uid = $options['_userid'];
     //require_once( 'AMP/Content/Tag/Item/List/Tags.php');
     //$tag_list = &new AMP_Content_Tag_Item_List_Tags ( $this->dbcon, array( 'uid' => $uid, 'live' => 1 ) );
     require_once 'AMP/Content/Item/Tag/Public/List.php';
     $tag_list =& new AMP_Content_Item_Tag_Public_List(false, array('uid' => $uid));
     $this->udm->fields[$this->addPrefix('tag_list_public')]['values'] = $this->inForm($tag_list->execute());
     $tag_values = AMPSystem_Lookup::instance('tagsByForm', $uid);
     if ($tag_values) {
         $this->udm->fields[$this->addPrefix('tag_add')]['value'] = array_keys($tag_values);
     }
 }
开发者ID:radicalsuz,项目名称:amp,代码行数:17,代码来源:Read.inc.php


示例18: _showSheetLocations

 function _showSheetLocations(&$source, $fieldname)
 {
     $filename = $source->getName();
     $section_locations = AMPContentLookup_StylesheetLocationSections::instance($filename);
     $template_locations = AMPContentLookup_StylesheetLocationTemplates::instance($filename);
     if (!($section_locations || $template_locations)) {
         return false;
     }
     $section_names = AMPContent_Lookup::instance('sections');
     $template_names = AMPSystem_Lookup::instance('templates');
     $output = '';
     if ($section_locations) {
         $output .= $this->_renderSheetLocations($section_locations, $section_names, AMP_TEXT_SECTION, AMP_SYSTEM_URL_SECTION);
     }
     if ($template_locations) {
         $output .= $this->_renderSheetLocations($template_locations, $template_names, AMP_TEXT_TEMPLATE, AMP_SYSTEM_URL_TEMPLATE);
     }
     return $output;
 }
开发者ID:radicaldesigns,项目名称:amp,代码行数:19,代码来源:List.inc.php


示例19: execute

 function execute($options = array())
 {
     $options = array_merge($this->getOptions(), $options);
     require_once 'AMP/UserData/Lookups.inc.php';
     $index_title = AMP_pluralize($this->udm->name) . " By " . $options['index_name'];
     $index_set =& FormLookup_Variant::instance($options['index_field'], $this->udm->instance);
     #$index['state']['sql'].="SELECT count(userdata.id) as qty, userdata.State as item_key, states.statename as item_name from userdata, states WHERE userdata.State=states.state and modin=".$_REQUEST['modin']." GROUP BY userdata.State ";
     $translated_values = isset($this->_region_lookups[$options['index_field']]) ? AMPSystem_Lookup::locate($this->_region_lookups[$options['index_field']]) : AMPSystem_Lookup::locate(array('instance' => AMP_pluralize($options['index_field'])));
     require_once 'AMP/Content/Display/HTML.inc.php';
     $renderer = new AMPDisplay_HTML();
     $output = $renderer->bold($index_title) . $renderer->newline();
     foreach ($index_set as $index_value => $index_count) {
         $display_value = $translated_values && isset($translated_values[$index_value]) ? $translated_values[$index_value] : $index_value;
         $display_value .= ' (' . $index_count . ')';
         $link_value = AMP_URL_AddVars($_SERVER['PHP_SELF'], array($options['index_field'] => strtolower($options['index_field']) . '=' . $index_value, 'modin' => 'modin=' . $this->udm->instance));
         $output .= $renderer->link($link_value, $display_value) . $renderer->newline();
         #$output .= '<a href="'.$_SERVER['PHP_SELF'].'?'.$options['index_field'].'='.$index_value.'&modin='.$_REQUEST['modin'].'">'.$index_item['item_name'].'</a> ('.$index_item['qty'].')<BR>';
     }
     return $output;
 }
开发者ID:radicaldesigns,项目名称:amp,代码行数:20,代码来源:Index.inc.php


示例20: getEmailTarget

 function getEmailTarget($options)
 {
     $field_prefix = $this->_field_prefix;
     $this->_field_prefix = '';
     $answer = $this->getData(array('Cell_Phone', 'Phone_Provider'));
     if (!(isset($answer['Cell_Phone']) && $answer['Cell_Phone'] && isset($answer['Phone_Provider']) && $answer['Phone_Provider'])) {
         return false;
     }
     $this->_field_prefix = $field_prefix;
     $provider_lookups = AMPSystem_Lookup::instance('cellProviderDomains');
     $account = AMP_cleanPhoneNumber($answer['Cell_Phone']);
     $domain = false;
     if (isset($provider_lookups[$answer['Phone_Provider']])) {
         $domain = $provider_lookups[$answer['Phone_Provider']];
     }
     if (!($account && $domain)) {
         return false;
     }
     return $account . '@' . $domain;
 }
开发者ID:radicaldesigns,项目名称:amp,代码行数:20,代码来源:SmsUser.inc.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP AMP_Registry类代码示例发布时间:2022-05-23
下一篇:
PHP AMA_DataHandler类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap