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


PHP get_multiple函数代码示例

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


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

示例1: _l

        <tr>
            <th>
                <?php 
echo _l('Configuration Key');
?>
            </th>
            <th>
                <?php 
echo _l('Configuration Value');
?>
            </th>
        </tr>
        </thead>
        <tbody>
        <?php 
foreach (get_multiple('config', false, 'key', 'exact', '`key`') as $config) {
    if (isset($config['key']) && isset($config['key'][0]) && $config['key'][0] == '_') {
        continue;
    }
    ?>
        <tr>
            <th>
                <?php 
    echo $config['key'];
    ?>
            </th>
            <td>
                <span data-name="config[<?php 
    echo htmlspecialchars($config['key']);
    ?>
]" class="config_variable"><?php 
开发者ID:sgh1986915,项目名称:php-crm,代码行数:31,代码来源:config_settings.php

示例2: htmlspecialchars

                                    </td><td>
                                        <input type="text" name="invoice_invoice_payment[<?php 
            echo $invoice_payment_id;
            ?>
][method]" value="<?php 
            echo htmlspecialchars($invoice_payment_data['method']);
            ?>
" size="20">
                                    </td>
                                    <td nowrap="">
                                        <?php 
            echo '<input type="text" name="invoice_invoice_payment[' . $invoice_payment_id . '][amount]" value="' . number_out($invoice_payment_data['amount']) . '" id="' . $invoice_payment_id . 'invoice_paymentamount" class="currency">';
            ?>

                                        <?php 
            echo print_select_box(get_multiple('currency', '', 'currency_id'), 'invoice_invoice_payment[' . $invoice_payment_id . '][currency_id]', $invoice_payment_data['currency_id'], '', false, 'code');
            ?>

                                    </td>
                                    <td>
                                        <?php 
            $notes = '';
            $details = false;
            if (isset($invoice_payment_data['data']) && $invoice_payment_data['data']) {
                $details = @unserialize($invoice_payment_data['data']);
                if ($details && isset($details['custom_notes'])) {
                    $notes = $details['custom_notes'];
                }
            }
            ?>
开发者ID:sgh1986915,项目名称:php-crm,代码行数:30,代码来源:invoice_admin_edit.php

示例3: get_notes

 public static function get_notes($search = false)
 {
     return get_multiple("note", $search, "note_id", "exact", "note_id");
 }
开发者ID:sgh1986915,项目名称:php-crm,代码行数:4,代码来源:note.php

示例4: print_table_data

    public static function print_table_data($owner_table, $owner_id)
    {
        if (self::can_i('view', 'Extra Fields') && isset(self::$column_headers[$owner_table])) {
            $extra_data = get_multiple('extra', array('owner_table' => $owner_table, 'owner_id' => $owner_id), 'extra_key');
            foreach (self::$column_headers[$owner_table] as $column_header) {
                ?>

                <td>
                    <?php 
                echo isset($extra_data[$column_header['key']]) ? forum_text($extra_data[$column_header['key']]['extra']) : '';
                ?>

                </td>
                <?php 
            }
        }
    }
开发者ID:sgh1986915,项目名称:php-crm,代码行数:17,代码来源:extra.php

示例5: get_data

 public function get_data()
 {
     if (count($this->_get_data_cache)) {
         return $this->_get_data_cache;
     }
     $file = false;
     if ($this->file_id > 0) {
         $file = get_single("file", "file_id", $this->file_id);
     }
     // check user has permissions to view this file.
     // for now we just base this on the customer id check
     if ($file) {
         // staff listing
         $staff = get_multiple('file_user_rel', array('file_id' => $file['file_id']), 'user_id');
         $file['staff_ids'] = array_keys($staff);
         $file['type'] = isset($file['file_url']) && $file['file_url'] ? 'remote' : (isset($file['bucket']) && $file['bucket'] ? 'bucket' : 'upload');
         if ($this->do_permissions) {
             switch (module_file::get_file_data_access()) {
                 case _FILE_ACCESS_ALL:
                     // all files, no limits on SQL here
                     break;
                 case _FILE_ACCESS_JOBS:
                     $jobs = module_job::get_jobs(array(), array('columns' => 'u.job_id AS id'));
                     if (!$file['job_id'] || !isset($jobs[$file['job_id']])) {
                         $file = false;
                     }
                     break;
                 case _FILE_ACCESS_ME:
                     if ($file['create_user_id'] != module_security::get_loggedin_id()) {
                         $file = false;
                     }
                     break;
                 case _FILE_ACCESS_ASSIGNED:
                     if (!in_array(module_security::get_loggedin_id(), $file['staff_ids'])) {
                         $file = false;
                     }
                     break;
                 case _FILE_ACCESS_CUSTOMERS:
                 default:
                     if (class_exists('module_customer', false)) {
                         //added for compat in newsletter system that doesn't have customer module
                         $customer_permission_check = module_customer::get_customer($file['customer_id']);
                         if ($customer_permission_check['customer_id'] != $file['customer_id']) {
                             $file = false;
                         }
                     }
             }
             // file data access switch
         }
     }
     if (!$file) {
         $file = array('new' => true, 'type' => 'upload', 'file_id' => 0, 'customer_id' => isset($_REQUEST['customer_id']) ? $_REQUEST['customer_id'] : 0, 'job_id' => isset($_REQUEST['job_id']) ? $_REQUEST['job_id'] : 0, 'quote_id' => isset($_REQUEST['quote_id']) ? $_REQUEST['quote_id'] : 0, 'description' => '', 'status' => module_config::c('file_default_status', 'Uploaded'), 'file_name' => '', 'file_url' => '', 'staff_ids' => array(), 'bucket' => 0, 'bucket_parent_file_id' => 0, 'approved_time' => 0);
     }
     $this->_get_data_cache = $file;
     return $file;
 }
开发者ID:sgh1986915,项目名称:php-crm,代码行数:56,代码来源:file.php

示例6: get_product_categories

 public static function get_product_categories($search = array())
 {
     return get_multiple("product_category", $search, "product_category_id", "fuzzy", "product_category_name");
 }
开发者ID:sgh1986915,项目名称:php-crm,代码行数:4,代码来源:product.php

示例7: get_datas

 function get_datas($search = false)
 {
     return get_multiple("data_record", $search, "data_record_id", "fuzzy");
 }
开发者ID:sgh1986915,项目名称:php-crm,代码行数:4,代码来源:data.php

示例8: output_block


//.........这里部分代码省略.........
 </a> <?php 
                        }
                        ?>
								</div>
							<?php 
                    }
                }
            }
            ?>
					<div>
						<?php 
            echo forum_text($this->get('summary'));
            ?>
					</div>
					<div class="twitter_comment_stats">
						<?php 
            $data = @json_decode($this->get('data'), true);
            //print_r($data);
            if ($data && (isset($data['retweet_count']) && $data['retweet_count'] > 0 || isset($data['favorite_count']) && $data['favorite_count'] > 0)) {
                if (isset($data['retweet_count']) && $data['retweet_count'] > 0) {
                    echo _l('Retweets: %s', $data['retweet_count']);
                }
                echo ' ';
                if (isset($data['favorite_count']) && $data['favorite_count'] > 0) {
                    echo _l('Favorites: %s', $data['favorite_count']);
                }
            }
            ?>
					</div>
				</div>
				<div class="twitter_comment_actions">
					<?php 
            if ($this->can_reply) {
                ?>
						<a href="#" class="twitter_reply_button"><?php 
                _e('Reply');
                ?>
</a>
					<?php 
            }
            ?>
				</div>
			</div>
		<?php 
        }
        ?>
		<?php 
        if ($level == 0) {
            ?>
			<div class="twitter_comment_replies">
			<?php 
            //if(strpos($twitter_data['message'],'picture')){
            //echo '<pre>'; print_r($twitter_data); echo '</pre>';
            //}
            if ($this->can_reply) {
                $this->reply_box($level, $message_from);
            }
            ?>
			</div>
		<?php 
        }
        if ($level >= 0) {
            // any follow up messages?
            if ($this->get('type') == _TWITTER_MESSAGE_TYPE_DIRECT) {
                $from = preg_replace('#[^0-9]#', '', $this->get('twitter_from_id'));
                $to = preg_replace('#[^0-9]#', '', $this->get('twitter_to_id'));
                if ($from && $to) {
                    $sql = "SELECT * FROM `" . _DB_PREFIX . "social_twitter_message` WHERE `type` = " . _TWITTER_MESSAGE_TYPE_DIRECT . " AND message_time >= " . (int) $this->get('message_time') . " AND social_twitter_message_id != " . (int) $this->social_twitter_message_id . " AND ( (`twitter_from_id` = {$from} AND `twitter_to_id` = {$to}) OR (`twitter_from_id` = {$to} AND `twitter_to_id` = {$from}) ) ORDER BY `message_time` ASC LIMIT 1";
                    $next = qa1($sql);
                    if ($next && $next['social_twitter_message_id']) {
                        ?>
						<div class="twitter_next_messages twitter_direct">
							<?php 
                        $reply_message = new ucm_twitter_message($this->twitter_account, $next['social_twitter_message_id']);
                        $reply_message->output_block($level + 1);
                        ?>
						</div>
						<?php 
                    }
                }
            } else {
                $next = get_multiple('social_twitter_message', array('social_twitter_id' => $this->twitter_account->get('social_twitter_id'), 'reply_to_id' => $this->social_twitter_message_id), 'social_twitter_message_id');
                if ($next) {
                    foreach ($next as $n) {
                        // this tweet is a reply to a previous tweet!
                        if ($n['social_twitter_message_id']) {
                            ?>
							<div class="twitter_next_messages">
								<?php 
                            $reply_message = new ucm_twitter_message($this->twitter_account, $n['social_twitter_message_id']);
                            $reply_message->output_block($level + 1);
                            ?>
							</div>
							<?php 
                        }
                    }
                }
            }
        }
    }
开发者ID:sgh1986915,项目名称:php-crm,代码行数:101,代码来源:twitter.class.php

示例9: upload

function upload($save_path, $custom_upload_max_filesize, $key, $type = array('jpg', 'jpeg', 'gif', 'png'))
{
    $return_data = array();
    //获取phpini配置文件里面的upload_max_filesize值
    $phpini = ini_get('upload_max_filesize');
    //获取phpini配置文件里面的upload_max_filesize值的单位
    $phpini_unit = strtoupper(substr($phpini, -1));
    //获取phpini配置文件里面的upload_max_filesize值的数字部分
    $phpini_number = substr($phpini, 0, -1);
    //计算出转换成字节应该乘以的倍数
    $phpini_multiple = get_multiple($phpini_unit);
    //转换成字节
    $phpini_bytes = $phpini_number * $phpini_multiple;
    $custom_unit = strtoupper(substr($custom_upload_max_filesize, -1));
    $custom_number = substr($custom_upload_max_filesize, 0, -1);
    $custom_multiple = get_multiple($custom_unit);
    $custom_bytes = $custom_number * $custom_multiple;
    if ($custom_bytes > $phpini_bytes) {
        $return_data['error'] = '传入的$custom_upload_max_filesize大于PHP配置文件里面的' . $phpini;
        $return_data['return'] = false;
        return $return_data;
    }
    $arr_errors = array(1 => '上传的文件超过了 php.ini中 upload_max_filesize 选项限制的值', 2 => '上传文件的大小超过了 HTML 表单中 MAX_FILE_SIZE 选项指定的值', 3 => '文件只有部分被上传', 4 => '没有文件被上传', 6 => '找不到临时文件夹', 7 => '文件写入失败');
    if (!isset($_FILES[$key]['error'])) {
        $return_data['error'] = '由于未知原因导致,上传失败,请重试!';
        $return_data['return'] = false;
        return $return_data;
    }
    if ($_FILES[$key]['error'] != 0) {
        $return_data['error'] = $arr_errors[$_FILES['error']];
        $return_data['return'] = false;
        return $return_data;
    }
    if (!is_uploaded_file($_FILES[$key]['tmp_name'])) {
        $return_data['error'] = '您上传的文件不是通过 HTTP POST方式上传的!';
        $return_data['return'] = false;
        return $return_data;
    }
    if ($_FILES[$key]['size'] > $custom_bytes) {
        $return_data['error'] = '上传文件的大小超过了程序作者限定的' . $custom_upload_max_filesize;
        $return_data['return'] = false;
        return $return_data;
    }
    $arr_filename = pathinfo($_FILES[$key]['name']);
    if (!isset($arr_filename['extension'])) {
        $arr_filename['extension'] = '';
    }
    if (!in_array($arr_filename['extension'], $type)) {
        $return_data['error'] = '上传文件的后缀名必须是' . implode(',', $type) . '这其中的一个';
        $return_data['return'] = false;
        return $return_data;
    }
    if (!file_exists($save_path)) {
        if (!mkdir($save_path, 0777, true)) {
            $return_data['error'] = '上传文件保存目录创建失败,请检查权限!';
            $return_data['return'] = false;
            return $return_data;
        }
    }
    $new_filename = str_replace('.', '', uniqid(mt_rand(100000, 999999), true));
    if ($arr_filename['extension'] != '') {
        $new_filename .= ".{$arr_filename['extension']}";
    }
    $save_path = rtrim($save_path, '/') . '/';
    if (!move_uploaded_file($_FILES[$key]['tmp_name'], $save_path . $new_filename)) {
        $return_data['error'] = '临时文件移动失败,请检查权限!';
        $return_data['return'] = false;
        return $return_data;
    }
    $return_data['save_path'] = $save_path . $new_filename;
    $return_data['filename'] = $new_filename;
    $return_data['return'] = true;
    return $return_data;
}
开发者ID:sakuraliu,项目名称:bbs,代码行数:74,代码来源:upload.inc.php

示例10: get_groups_search

 public static function get_groups_search($search = false)
 {
     $groups = get_multiple('group_member', $search);
     foreach ($groups as $group_id => $group) {
         // find the group name for this group.
         $groups[$group_id] = array_merge($group, self::get_group($group['group_id']));
     }
     return $groups;
 }
开发者ID:sgh1986915,项目名称:php-crm,代码行数:9,代码来源:group.php

示例11: get_languages_attributes

 public static function get_languages_attributes()
 {
     $all = array();
     $language_files = glob(_UCM_FOLDER . 'includes/plugin_language/custom/*.php');
     if (is_array($language_files)) {
         foreach ($language_files as $language) {
             $language = strtolower(str_replace('.php', '', basename($language)));
             if ($language[0] == '_') {
                 continue;
             }
             $all[$language] = array('language_name' => $language, 'language_code' => $language);
         }
     }
     $language_files = glob(_UCM_FOLDER . 'includes/plugin_language/labels/*.php');
     if (is_array($language_files)) {
         foreach ($language_files as $language) {
             $language = strtolower(str_replace('.php', '', basename($language)));
             if ($language[0] == '_') {
                 continue;
             }
             $all[$language] = array('language_name' => $language, 'language_code' => $language);
         }
     }
     if (self::is_language_db_enabled()) {
         foreach ($all as $language_code => $language) {
             // does this language code exist in the database?
             $language_db = get_single('language', 'language_code', $language_code);
             if (!$language_db || $language_db['language_code'] != $language_code) {
                 update_insert('language_id', false, 'language', array('language_code' => $language['language_code'], 'language_name' => $language['language_name']));
             }
         }
         // now we get any language attributes from the database and overwrite the old file based ones with those.
         foreach (get_multiple('language', false, 'language_id', 'exact', 'language_code') as $language) {
             if (isset($all[strtolower($language['language_code'])])) {
                 // this language exists in the old file based method.
                 $all[strtolower($language['language_code'])] = $language;
             } else {
                 // this is a language that only exists in the new database translation method.
                 $all[strtolower($language['language_code'])] = $language;
             }
             // todo - well, not sure about the above. maybe we do some update here and remove the old files ??? move everything to the database or something?? meh..
         }
     }
     return $all;
 }
开发者ID:sgh1986915,项目名称:php-crm,代码行数:45,代码来源:language.php

示例12: htmlspecialchars

echo htmlspecialchars($invoice['total_tax_rate']);
?>
" style="width:35px;">%

                                </td>
                            </tr>
                            <tr>
                                <th>
                                    <?php 
echo _l('Currency');
?>

                                </th>
                                <td>
                                    <?php 
echo print_select_box(get_multiple('currency', '', 'currency_id'), 'currency_id', $invoice['currency_id'], '', false, 'code');
?>

                                </td>
                            </tr>
                            <tr>
                                <th>
                                    <?php 
echo _l('Hourly Rate');
?>

                                </th>
                                <td>
                                    <?php 
echo currency('<input type="text" name="hourly_rate" class="currency" value="' . $invoice['hourly_rate'] . '">', true, $invoice['currency_id']);
echo _h('This hourly rate will be applied to all manual tasks (tasks that did not come from jobs) in this invoice');
开发者ID:sgh1986915,项目名称:php-crm,代码行数:31,代码来源:invoice_admin_credit.php

示例13: _e

            <th class="width2">
                <?php 
_e('Menu Item');
?>
            </th>
            <th>
                <?php 
_e('Position');
?>
            </th>
        </tr>
        </thead>
        <tbody>
        <?php 
$c = 0;
foreach (get_multiple('config') as $config) {
    if (preg_match('#_menu_order_(.*)#', $config['key'], $matches)) {
        ?>
                <tr class="<?php 
        echo $c++ % 2 ? 'odd' : 'even';
        ?>
">
                    <td>
                        <?php 
        echo $matches[1];
        ?>
                    </td>
                    <td>
                        <input type="text" name="save_config[<?php 
        echo $matches[0];
        ?>
开发者ID:sgh1986915,项目名称:php-crm,代码行数:31,代码来源:config_menu.php

示例14: get_faq

 public static function get_faq($faq_id)
 {
     $faq = get_single('faq', 'faq_id', $faq_id);
     // get linked ids
     $faq['faq_product_ids'] = array();
     foreach (get_multiple('faq_product_rel', array('faq_id' => $faq_id)) as $product) {
         $faq['faq_product_ids'][$product['faq_product_id']] = $product['faq_product_id'];
     }
     return $faq;
 }
开发者ID:sgh1986915,项目名称:php-crm,代码行数:10,代码来源:faq.php

示例15: get_encrypt_keys

 public static function get_encrypt_keys()
 {
     return get_multiple('encrypt_key', false, 'encrypt_key_id');
 }
开发者ID:sgh1986915,项目名称:php-crm,代码行数:4,代码来源:encrypt.php


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