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

PHP Browse类代码示例

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

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



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

示例1: act_set_help

 public function act_set_help()
 {
     global $global;
     global $conf;
     $browse = new Browse();
     $id = $_GET['element_id'];
     $message = $_GET['wysiwyg'];
     $sql = "UPDATE help SET definition='{$message}' WHERE field_number ='{$id}'";
     $res = $browse->ExecuteNonQuery($sql);
     exit(0);
 }
开发者ID:GeraldScott,项目名称:OpenEvSys,代码行数:11,代码来源:helpModule.class.php


示例2: showPanel

 /**
  * 显示当前面板内容
  * @Title: showPanel
  * @Description: todo(页面展示)
  * @author 管理员
  * @date 2015-06-30 19:36:36
  * @throws
  */
 public function showPanel()
 {
     import('@.ORG.Browse');
     $submodel = M("mis_system_panel_desing_sub");
     $sublist = $submodel->where("masid=15")->select();
     $scdmodel = D("SystemConfigDetail");
     $map["status"] = 1;
     foreach ($sublist as $key => $val) {
         $model = $val["modelname"];
         $fields = explode(",", $val["showtitle"]);
         $defaultwidth = (int) 100 / count($fields);
         $temp = explode(",", $val["showtitle"]);
         foreach ($temp as $tk => $tv) {
             $temparr = explode("|", $tv);
             if ($temparr[2]) {
                 $fields[$temparr[0]]['name'] = $temparr[0];
                 $fields[$temparr[0]]['width'] = $temparr[1];
                 $fields[$temparr[0]]['sort'] = $temparr[2];
             }
         }
         sortArray($fields, 'sort', 'asc', 'number');
         $detailList = $scdmodel->getDetail($model, true, "", "status");
         $sublist[$key]['link'] = __APP__ . "/" . $model . "/index";
         $sublist[$key]['rel'] = $model;
         $newd = array();
         foreach ($fields as $k => $v) {
             foreach ($detailList as $dk => $dv) {
                 if ($v['name'] == $dv['name']) {
                     $newd[$k] = $dv;
                     $newd[$k]['shows'] = 1;
                     $newd[$k]['sortnum'] = $v['sort'];
                     if (strpos('px', $v['width']) > 0 || strpos('PX', $v['width']) > 0 || strpos('Px', $v['width']) > 0) {
                         $newd[$k]['widths'] = $v['width'];
                     } else {
                         $newd[$k]['widths'] = $v['width'] ? $v['width'] . "%" : $defaultwidth . "%";
                     }
                 }
             }
         }
         $sublist[$key]["detailList"] = $newd;
         //具体数据1
         $listmodel = D($model);
         $val['num'] = $val['num'] ? $val['num'] : 5;
         //获取当前模型数据权限 by renl 20150626
         $broMap = Browse::getUserMap($model);
         if ($broMap) {
             if ($map['_string']) {
                 $map['_string'] .= " and " . $broMap;
             } else {
                 $map['_string'] = $broMap;
             }
         }
         $list = $listmodel->where($map)->order('id desc')->limit($val['num'])->select();
         $sublist[$key]["list"] = $list;
         unset($map["_string"]);
     }
     $this->assign("sublist", $sublist);
     $this->display("MisSystemPanelDesingMas:news");
 }
开发者ID:tmlsoft,项目名称:main,代码行数:67,代码来源:MisSystemPanelJvtAction.class.php


示例3: l10n

 public function l10n($subformat)
 {
     global $conf;
     $locale = $conf['locale'];
     $sql = "SELECT field_label, field_number FROM data_dict WHERE field_name = '{$subformat}'";
     $browse = new Browse();
     $field = $browse->ExecuteQuery($sql)[0];
     $result = $field['field_label'];
     if ($locale != 'en') {
         $field_number = $field['field_number'];
         $sql = "SELECT msgstr FROM data_dict_l10n WHERE msgid = {$field_number} AND locale = '{$locale}'";
         $l10n = $browse->ExecuteQuery($sql);
         if (!is_null($l10n)) {
             $result = $l10n[0]['msgstr'];
         }
     }
     return $result;
 }
开发者ID:GeraldScott,项目名称:OpenEvSys,代码行数:18,代码来源:subformats.php


示例4: loadUserFieldNames

 private function loadUserFieldNames()
 {
     $entityFields = Browse::getEntityFields($this->getEntityType());
     foreach ($entityFields as $entityField) {
         $mlt = trim($entityField['is_repeat']) == 'Y' || trim($entityField['is_repeat']) == 'y' ? true : false;
         if ($mlt && $entityField['field_type'] == 'user_select') {
             $this->uf[] = $entityField['field_name'];
         }
     }
     $this->uf = array_unique($this->uf);
 }
开发者ID:GeraldScott,项目名称:OpenEvSys,代码行数:11,代码来源:DomainEntity.php


示例5: saveBrowse

 public function saveBrowse($nCoolType)
 {
     try {
         // 		$record = new BrowseRecord();
         $br = new Browse();
         $br->setRecord();
         // 		$result = $record->saveRecord($nCoolType, $br);
         // 		if(!$result){
         // 			Log::write('RecordTask::saverBrowse():saveRecord() failed', 'log');
         // // 			return false;
         // 		}
         // 		$record->close();
         // 		Log::write('RecordTask::saverRequest():saveBrowse()', 'debug');
         $queue = new QueueTask();
         $queue->push('browse', $nCoolType, json_encode($br), 'coolshow_browse_count');
     } catch (Exception $e) {
         Log::write('RecordTask::saveBrowse():QueueTask():push() failed', 'log');
     }
     return true;
 }
开发者ID:vvcumt,项目名称:zk,代码行数:20,代码来源:RecordTask.class.php


示例6: getAllHuriTerms

 public function getAllHuriTerms($fieldName)
 {
     if (is_numeric($fieldName)) {
         $listCode = (int) $fieldName;
         $fieldName = $this->getFieldNameforListCode($listCode);
     } else {
         $listCode = $this->getListCodeforMTField($fieldName);
     }
     if ($listCode != null || trim($listCode) != '') {
         //var_dump($listCode);
         $mtTable = "mt_{$listCode}_{$fieldName}";
         $consistancyJoin = "INNER JOIN {$mtTable} ON m.vocab_number = {$mtTable}.vocab_number";
     }
     global $conf;
     $sql = "SELECT m.vocab_number , IFNULL(l.msgstr , english) as 'label',\n                term_order,parent_vocab_number ,term_level ,huri_code\n                FROM mt_vocab m \n                LEFT JOIN mt_vocab_l10n l ON ( l.msgid = m.vocab_number AND l.locale = '{$conf['locale']}' )\n                {$consistancyJoin}\n                WHERE TRIM(list_code)='{$listCode}' AND (visible = 'y' or visible IS NULL) ORDER BY term_order";
     //echo $sql;exit;
     $browse = new Browse();
     $res = $browse->ExecuteQuery($sql);
     //print_r($res);
     return $res;
 }
开发者ID:GeraldScott,项目名称:OpenEvSys,代码行数:21,代码来源:MtTerms.php


示例7: ob_get_clean

            echo "</div>";
            $results['fslider'] = ob_get_clean();
            ob_start();
            echo "<script language='javascript' type='text/javascript'>";
            echo "\$('#" . $fsname . "').rhinoslider({\n                    showTime: 15000,\n                    effectTime: 2000,\n                    randomOrder: true,\n                    controlsPlayPause: false,\n                    autoPlay: true,\n                    showBullets: 'never',\n                    showControls: 'always',\n                    controlsMousewheel: false,\n            });";
            echo "</script>";
        }
        $results['fslider_script'] = ob_get_clean();
        break;
    case 'songs':
        $label_id = intval($_REQUEST['label']);
        ob_start();
        if ($label_id > 0) {
            $label = new Label($label_id);
            $object_ids = $label->get_songs();
            $browse = new Browse();
            $browse->set_type('song');
            $browse->set_simple_browse(false);
            $browse->save_objects($object_ids);
            $browse->store();
            UI::show_box_top(T_('Songs'), 'info-box');
            require_once AmpConfig::get('prefix') . UI::find_template('show_songs.inc.php');
            UI::show_box_bottom();
        }
        $results['songs'] = ob_get_contents();
        ob_end_clean();
        break;
    default:
        $results['rfc3514'] = '0x1';
        break;
}
开发者ID:ivan801,项目名称:ampache,代码行数:31,代码来源:index.ajax.php


示例8: switch

 * as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 *
 */
require_once '../lib/init.php';
if (!Access::check('interface', 100)) {
    UI::access_denied();
    exit;
}
UI::show_header();
switch ($_REQUEST['action']) {
    default:
        // Show Catalogs
        $catalog_ids = Catalog::get_catalogs();
        $browse = new Browse();
        $browse->set_type('catalog');
        $browse->set_static_content(true);
        $browse->save_objects($catalog_ids);
        $browse->show_objects($catalog_ids);
        $browse->store();
        break;
}
UI::show_footer();
开发者ID:axelsimon,项目名称:ampache,代码行数:31,代码来源:index.php


示例9: array

 case 'basket':
     $object_type = $_REQUEST['type'];
     $object_id = $_REQUEST['id'];
     if (Core::is_playable_item($object_type)) {
         if (!is_array($object_id)) {
             $object_id = array($object_id);
         }
         foreach ($object_id as $id) {
             $item = new $object_type($id);
             $medias = $item->get_medias();
             $GLOBALS['user']->playlist->add_medias($medias);
         }
     } else {
         switch ($_REQUEST['type']) {
             case 'browse_set':
                 $browse = new Browse($_REQUEST['browse_id']);
                 $objects = $browse->get_saved();
                 foreach ($objects as $object_id) {
                     $GLOBALS['user']->playlist->add_object($object_id, 'song');
                 }
                 break;
             case 'album_random':
                 $data = explode('_', $_REQUEST['type']);
                 $type = $data['0'];
                 foreach ($_REQUEST['id'] as $i) {
                     $object = new $type($i);
                     $songs = $object->get_random_songs();
                     foreach ($songs as $song_id) {
                         $GLOBALS['user']->playlist->add_object($song_id, 'song');
                     }
                 }
开发者ID:nioc,项目名称:ampache,代码行数:31,代码来源:ajax.server.php


示例10: Browse

if (AmpConfig::get('sociable')) {
    ?>
        <div id="following" class="tab_content">
        <?php 
    $following_ids = $client->get_following();
    $browse = new Browse();
    $browse->set_type('user');
    $browse->set_simple_browse(false);
    $browse->show_objects($following_ids);
    $browse->store();
    ?>
        </div>
        <div id="followers" class="tab_content">
        <?php 
    $follower_ids = $client->get_followers();
    $browse = new Browse();
    $browse->set_type('user');
    $browse->set_simple_browse(false);
    $browse->show_objects($follower_ids);
    $browse->store();
    ?>
        </div>
            <div id="timeline" class="tab_content">
                <?php 
    if (Preference::get_by_user($client->id, 'allow_personal_info_recent')) {
        $activities = Useractivity::get_activities($client->id);
        Useractivity::build_cache($activities);
        foreach ($activities as $aid) {
            $activity = new Useractivity($aid);
            $activity->show();
        }
开发者ID:cheese1,项目名称:ampache,代码行数:31,代码来源:show_user.inc.php


示例11: session_start

 * Sub-Ajax page, requires AJAX_INCLUDE
 */
require_once '../lib/init.php';
if (!Core::is_session_started()) {
    session_start();
}
if (!defined('AJAX_INCLUDE')) {
    exit;
}
if (isset($_REQUEST['browse_id'])) {
    $browse_id = $_REQUEST['browse_id'];
} else {
    $browse_id = null;
}
debug_event('browse.ajax.php', 'Called for action: {' . $_REQUEST['action'] . '}', '5');
$browse = new Browse($browse_id);
if (isset($_REQUEST['show_header']) && $_REQUEST['show_header']) {
    $browse->set_show_header($_REQUEST['show_header'] == 'true');
}
$argument = null;
if ($_REQUEST['argument']) {
    $argument = scrub_in($_REQUEST['argument']);
}
$results = array();
switch ($_REQUEST['action']) {
    case 'browse':
        $object_ids = array();
        // Check 'value' with isset because it can null
        //(user type a "start with" word and deletes it)
        if ($_REQUEST['key'] && (isset($_REQUEST['multi_alpha_filter']) or isset($_REQUEST['value']))) {
            // Set any new filters we've just added
开发者ID:nioc,项目名称:ampache,代码行数:31,代码来源:browse.ajax.php


示例12: signin

 /**
  * @Title: signin 
  * @Description: todo(浏览器版登陆方法)   
  * @author liminggang 
  * @date 2014-8-28 下午4:34:10 
  * @throws
  */
 public function signin()
 {
     //获取产品模块授权培
     $model = D('SerialNumber');
     $system = array();
     $system = $model->CheckFile();
     if (count($system) > 0) {
         //验证序列号文件是否存在,基本校验。
         redirect(U("Public/serialnumber?register=" . $_POST['account']));
     }
     //读取名人录数据
     //$this->getsolidotinfor();
     if ($_POST["login_type"] == "dialog") {
         $this->loginType = "dialog";
     }
     if (empty($_POST['account'])) {
         $this->assign("jumpUrl", __URL__ . '/login/');
     } elseif (empty($_POST['password'])) {
         $this->assign("jumpUrl", __URL__ . '/login/');
     } elseif (C("VERIFICATION_CODE") && empty($_POST['verify'])) {
         if ($this->loginType != 'helperLogin') {
             $this->assign("jumpUrl", __URL__ . '/login/');
             $this->error('验证码必须!');
         }
     } elseif (C("VERIFICATION_CODE") && $_SESSION['verify'] != md5($_POST['verify'])) {
         if ($this->loginType != 'helperLogin') {
             $this->assign("jumpUrl", __URL__ . '/login/');
             $this->error('验证码错误!');
         }
     }
     //获取authinfo信息
     $authInfo = $this->getAuthInfo();
     //使用用户名、密码和状态的方式进行认证
     if (false == $authInfo) {
         $this->assign("jumpUrl", __URL__ . '/login/');
         if ($this->loginType != 'helperLogin') {
             $this->assign("info", "帐号不存在或已禁用!");
             $this->display('login');
         } else {
             return array('status' => 0, 'msg' => "error:帐号不存在或已禁用!");
             exit;
         }
     } else {
         //--------------此部分为验证密码-------------------//
         $checkPwd = $this->checkPwd($authInfo);
         if ($checkPwd) {
             return $checkPwd;
         }
         //-----------以下部分已被分成方法-------------//
         $this->setSession($authInfo);
         //设置session
         $this->setUserInfoCookie($authInfo);
         //设置UserInfo的cookie
         //$this->setBBSCookie($authInfo);//设置BBS的cookie
         $time = time();
         //保存登录信息
         $ip = get_client_ip();
         $data = array();
         $data['last_login_time'] = $time;
         $data['logintime'] = $time;
         $data['isonline'] = 1;
         $data['sessionid'] = session_id();
         $data['id'] = $authInfo['id'];
         $data['login_count'] = array('exp', 'login_count+1');
         $data['login_error_count'] = 0;
         $data['newmsg'] = 1;
         $data['newmsgtype'] = 1;
         $data['last_login_ip'] = $ip;
         if (!$bindacount) {
             $User = M('User');
             $User->save($data);
             $User->commit();
         }
         //新增online信息,类型为新增
         $this->setUserOnline($authInfo, $type = "insert");
         // 缓存访问权限
         RBAC::saveAccessList();
         //写入浏览及权限
         Browse::saveBrowseList();
         if (isset($_SESSION[C('ADMIN_AUTH_KEY')])) {
             $re = $this->check_upgrade(false);
         }
         //如果是从OA客户端登录的,返回真
         if ($this->loginType == 'helperLogin') {
             if ($_REQUEST['fromOA'] == 2) {
                 //$this->success('登录成功!');
                 redirect(U('Index/index'), 0.01, '页面跳转中。。。');
             } else {
                 return array('status' => 1, 'msg' => "success:登录成功!");
                 exit;
             }
         } else {
             if ($this->loginType != 'checkLogin') {
//.........这里部分代码省略.........
开发者ID:tmlsoft,项目名称:main,代码行数:101,代码来源:PublicAction.class.php


示例13: searchResult

 protected function searchResult()
 {
     require_once APPROOT . 'mod/analysis/analysisModule.class.php';
     $analysisModule = new analysisModule();
     $dataArray = array();
     //assign post search queries to get
     foreach ($_REQUEST as $key => $element) {
         if ($_REQUEST[$key] != null) {
             $_GET[$key] = $_REQUEST[$key];
         }
     }
     $sqlStatement = $analysisModule->generateSqlforEntity('person', null, $_REQUEST, 'search');
     $entity_type_form_results = generate_formarray('person', 'search_view');
     $entity_type_form_results['person_record_number']['type'] = 'text';
     $field_list = array();
     foreach ($entity_type_form_results as $field_name => $field) {
         $field_list[$field['map']['field']] = $field['label'];
     }
     foreach ($entity_type_form_results as $fieldName => &$field) {
         $field['extra_opts']['help'] = null;
         $field['label'] = null;
         $field['extra_opts']['clari'] = null;
         $field['extra_opts']['value'] = $_GET[$fieldName];
         $field['extra_opts']['required'] = null;
     }
     $entity_fields_html = shn_form_get_html_fields($entity_type_form_results);
     $htmlFields = array();
     //iterate through the search fields, checking input values
     foreach ($entity_type_form_results as $field_name => $x) {
         // Generates the view's Label list
         $htmlFields[$field_name] = $entity_fields_html[$field_name];
     }
     $result_pager = Browse::getExecuteSql($sqlStatement);
     $columnValues = $result_pager->get_page_data();
     $columnValues = set_links_in_recordset($columnValues, 'person');
     set_huriterms_in_record_array($entity_type_form_results, $columnValues);
     //rendering the view
     $columnNames = $field_list;
     $this->htmlFields = $htmlFields;
     if ($columnValues != null && count($columnValues)) {
         $result_pager->render_pages();
         shn_form_get_html_person_search_ctrl($columnNames, $columnValues, $htmlFields, $_GET['mod'], $_GET['act']);
         $result_pager->render_pages();
     } else {
         shnMessageQueue::addInformation(_t('NO_RECORDS_WERE_FOUND_'));
         echo shnMessageQueue::renderMessages();
     }
 }
开发者ID:GeraldScott,项目名称:OpenEvSys,代码行数:48,代码来源:relatedPersonSearch.class.php


示例14: License

        if (isset($_POST['license_id'])) {
            $license = new License($_POST['license_id']);
            if ($license->id) {
                $license->update($_POST);
            }
            $text = T_('License Updated');
        } else {
            License::create($_POST);
            $text = T_('License Created');
        }
        show_confirmation($text, '', AmpConfig::get('web_path') . '/admin/license.php');
        break;
    case 'show_edit':
        $license = new License($_REQUEST['license_id']);
    case 'show_create':
        require_once AmpConfig::get('prefix') . '/templates/show_edit_license.inc.php';
        break;
    case 'delete':
        License::delete($_REQUEST['license_id']);
        show_confirmation(T_('License Deleted'), '', AmpConfig::get('web_path') . '/admin/license.php');
        break;
    default:
        $browse = new Browse();
        $browse->set_type('license');
        $browse->set_simple_browse(true);
        $license_ids = $browse->get_objects();
        $browse->show_objects($license_ids);
        $browse->store();
        break;
}
UI::show_footer();
开发者ID:nioc,项目名称:ampache,代码行数:31,代码来源:license.php


示例15: act_dashboard

 public function act_dashboard()
 {
     global $global, $conf;
     $activeFormats = getActiveFormats();
     $entityFields = Browse::getAllEntityFields();
     $response = array();
     foreach ($activeFormats as $format => $formatTitle) {
         if ($conf['dashboard_format_counts_' . $format] != 'true') {
             continue;
         }
         $count_query = "SELECT COUNT(*) as count FROM {$format} ";
         try {
             $res_count = $global['db']->Execute($count_query);
             foreach ($res_count as $row) {
                 $response["counts"][$format] = array((int) $row["count"], $formatTitle);
             }
         } catch (Exception $e) {
         }
     }
     $timelineType = "day";
     if ($_REQUEST['timelinetype'] == "month") {
         $timelineType = "month";
     } elseif ($_REQUEST['timelinetype'] == "year") {
         $timelineType = "year";
     }
     $this->timelineType = $timelineType;
     if ($timelineType == "month") {
         $dateFormat = '%b %Y';
     } elseif ($timelineType == "year") {
         $dateFormat = '%Y';
     } else {
         $dateFormat = '%d %b %Y';
     }
     $datestart = "";
     $dateend = "";
     if (isset($_REQUEST['daterange'])) {
         $daterange = $_REQUEST['daterange'];
         $daterange = explode(",", $daterange);
         $datestart2 = trim($daterange[0]);
         $dateend2 = trim($daterange[1]);
         $date_format = 'Y-m-d';
         $timestart = strtotime($datestart2);
         $timeend = strtotime($dateend2);
         if ($timestart && $timeend) {
             $datestart = date($date_format, $timestart);
             $dateend = date($date_format, $timeend);
         }
     }
     if ($datestart && $dateend) {
         $this->daterange = $datestart . " , " . $dateend;
     } else {
         $this->daterange = "";
     }
     /*$sql = "SELECT  DATE_FORMAT(m.date_of_entry,'$dateFormat') as val , COUNT(e.event_record_number) AS count
               FROM  event e join management m on m.entity_id=e.event_record_number and m.entity_type='event' ";
       if ($datestart && $dateend) {
           $sql .= " where m.date_of_entry BETWEEN '$datestart' AND '$dateend' ";
       }
       $sql .= "GROUP BY val order by m.date_of_entry ";*/
     $dashboard_date_counts = array();
     if ($conf['dashboard_date_counts']) {
         $dashboard_date_counts = @json_decode($conf['dashboard_date_counts']);
         $dashboard_date_counts = (array) $dashboard_date_counts;
     }
     $response["timeline"] = array();
     foreach ($entityFields as $record) {
         $entity = $record['entity'];
         $field = $record['field_name'];
         $selVal = $entity . "|||" . $field;
         if (in_array($selVal, $dashboard_date_counts)) {
             $primary_key = get_primary_key($entity);
             if (in_array($field, array('date_received', 'date_of_entry', 'date_updated'))) {
                 $sql = "SELECT  DATE_FORMAT(m.{$field},'{$dateFormat}') as val , COUNT(e.{$primary_key}) AS count\n                      FROM  {$entity} e join management m on m.entity_id=e.{$primary_key} and m.entity_type='{$entity}' ";
                 if ($datestart && $dateend) {
                     $sql .= " where m.{$field} BETWEEN '{$datestart}' AND '{$dateend}' ";
                 }
                 $sql .= "GROUP BY val order by m.{$field} ";
             } else {
                 $sql = "SELECT  DATE_FORMAT(e.{$field} ,'{$dateFormat}') as val , COUNT(e.{$primary_key}) AS count\n                      FROM  {$entity} e  ";
                 if ($datestart && $dateend) {
                     $sql .= " where e.{$field}  BETWEEN '{$datestart}' AND '{$dateend}' ";
                 }
                 $sql .= "GROUP BY val order by e.{$field}  ";
             }
             $response["timeline"][$selVal]['entity'] = $entity;
             $response["timeline"][$selVal]['entity_label'] = $activeFormats[$entity];
             $response["timeline"][$selVal]['field_name'] = $field;
             $response["timeline"][$selVal]['field_label'] = $record['field_label'];
             try {
                 $res_count = $global['db']->Execute($sql);
                 foreach ($res_count as $row) {
                     $response["timeline"][$selVal]['data'][0] = array(ucfirst($timelineType), "Count");
                     if (!$row["val"] && !(int) $row["count"]) {
                         continue;
                     }
                     if (!$row["val"]) {
                         $row["val"] = "Undefined";
                     }
                     $response["timeline"][$selVal]['data'][] = array($row["val"], (int) $row["count"]);
                 }
//.........这里部分代码省略.........
开发者ID:GeraldScott,项目名称:OpenEvSys,代码行数:101,代码来源:dashboardModule.class.php


示例16: delete

 public function delete($ids)
 {
     if (!is_array($ids)) {
         $ids = array($ids);
     }
     $browse = new Browse();
     $sql = "DELETE FROM {$this->subformat_name} WHERE `vocab_number` in ('" . implode("', '", $ids) . "')";
     $browse->ExecuteNonQuery($sql);
 }
开发者ID:GeraldScott,项目名称:OpenEvSys,代码行数:9,代码来源:SubformatsModel.php


示例17: get_data_array


//.........这里部分代码省略.........
                        //$row[$entityField['field_name'] . "_longitude"] = -floatval($val2[1]);
                        $glData[$ent][$entityField['field_name'] . "_latitude"] = -floatval($val2[0]);
                        $glData[$ent][$entityField['field_name'] . "_longitude"] = -floatval($val2[1]);
                        $val = null;
                    } elseif ($type == "radio") {
                        if ($val == "NO" || $val == "no") {
                            $val = "n";
                        } elseif ($val == "SÍ" || $val == "sí") {
                            $val = "y";
                        } else {
                            $val = null;
                        }
                    }
                    if (!is_null($val)) {
                        //$row[$entityField['field_name']] = $val;
                        $glData[$ent][$entityField['field_name']] = $val;
                    }
                }
            }
            if (!$glData['act']['ubicacto']) {
                $v = $row[25];
                $vocab_number = array_search(strtolower($v), $lists[71]);
                if ($vocab_number) {
                    $glData['act']['ubicacto'] = $vocab_number;
                }
            }
            if (!$glData['act']['ubicacto']) {
                $v = $row[24];
                $vocab_number = array_search(strtolower($v), $lists[71]);
                if ($vocab_number) {
                    $glData['act']['ubicacto'] = $vocab_number;
                }
            }
            $browse = new Browse();
            $rows = $browse->ExecuteQuery("select event_record_number as id from event where event_title='" . $glData['event']['event_title'] . "'");
            if ($rows && $rows[0]['id']) {
                $event = new Event();
                $event->LoadFromRecordNumber($rows[0]['id']);
            } else {
                $form = event_form('new');
                $event = new Event();
                $event->event_record_number = shn_create_uuid('event');
                form_objects($form, $event, $glData['event']);
                $event->SaveAll();
            }
            $browse = new Browse();
            $person = null;
            if ($glData['person']['person_name'] != "NN") {
                $rows = $browse->ExecuteQuery("select person_record_number as id from person where person_name='" . $glData['person']['person_name'] . "' \n\t\t\t\tand other_names='" . $glData['person']['other_names'] . "' ");
                if ($rows && $rows[0]['id']) {
                    $person = new Person();
                    $person->LoadFromRecordNumber($rows[0]['id']);
                }
            }
            if (!$person) {
                $person_form = person_form('new');
                $person = new Person();
                form_objects($person_form, $person, $glData['person']);
                $person->deceased = $person->deceased == 'on' ? 'y' : 'n';
                if (isset($person->number_of_persons_in_group) && !$person->number_of_persons_in_group) {
                    $person->number_of_persons_in_group = Null;
                }
                if (isset($person->dependants) && !$person->dependants) {
                    $person->dependants = Null;
                }
                $person->SaveAll();
开发者ID:GeraldScott,项目名称:OpenEvSys,代码行数:67,代码来源:import.php


示例18: Browse

<?php

/* vim:set softtabstop=4 shiftwidth=4 expandtab: */
/**
 *
 * LICENSE: GNU General Public License, version 2 (GPLv2)
 * Copyright 2001 - 2015 Ampache.org
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License v2
 * as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 *
 */
$object_ids = Wanted::get_wanted_list();
$browse = new Browse();
$browse->set_type('wanted');
$browse->set_static_content(true);
$browse->save_objects($object_ids);
$browse->show_objects($object_ids);
$browse->store();
开发者ID:nioc,项目名称:ampache,代码行数:29,代码来源:show_stats_wanted.inc.php


示例19: T_

', '<?php 
        echo T_('Album edit');
        ?>
', '')">
                <?php 
        echo UI::get_icon('edit', T_('Edit'));
        ?>
            </a>
        <?php 
    }
    ?>
    </div>
    <div id='reordered_list_<?php 
    echo $album_id;
    ?>
'>
    <?php 
    $browse = new Browse();
    $browse->set_show_header(false);
    $browse->set_type('song');
    $browse->set_simple_browse(true);
    $browse->set_filter('album', $album_id);
    $browse->set_sort('track', 'ASC');
    $browse->get_objects();
    $browse->show_objects(null, true);
    // true argument is set to show the reorder column
    $browse->store();
    ?>
    </div><br />
<?php 
}
开发者ID:cheese1,项目名称:ampache,代码行数:31,代码来源:show_album_group_disks.inc.php


示例20: session_start

 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 */
if (!Core::is_session_started()) {
    session_start();
}
?>

<?php 
$allowed_filters = Browse::get_allowed_filters($browse->get_type());
?>
<li>
    <h4><?php 
echo T_('Filters');
?>
</h4>
    <div class="sb3">
    <?php 
if (in_array('starts_with', $allowed_filters)) {
    ?>
        <form id="multi_alpha_filter_form" action="javascript:void(0);">
            <label id="multi_alpha_filterLabel" for="multi_alpha_filter"><?php 
    echo T_('Starts With');
    ?>
</label>
开发者ID:cheese1,项目名称:ampache,代码行数:31,代码来源:browse_filters.inc.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP Browser类代码示例发布时间:2022-05-23
下一篇:
PHP Brick类代码示例发布时间: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