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

PHP getDisplayDate函数代码示例

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

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



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

示例1: getAuditTrailEntries

 /**
   * Function to get the Audit Trail Information values of the actions performed by a particular User.
   * @param integer $userid - User's ID
   * @param $navigation_array - Array values to navigate through the number of entries.
   * @param $sortorder - DESC
   * @param $orderby - actiondate
   * Returns the audit trail entries in an array format.
 **/
 function getAuditTrailEntries($userid, $navigation_array, $sorder = '', $orderby = '')
 {
     global $log;
     $log->debug("Entering getAuditTrailEntries(" . $userid . ") method ...");
     global $adb, $current_user;
     if ($sorder != '' && $order_by != '') {
         $list_query = "Select * from vtiger_audit_trial where userid =? order by " . $order_by . " " . $sorder;
     } else {
         $list_query = "Select * from vtiger_audit_trial where userid =? order by " . $this->default_order_by . " " . $this->default_sort_order;
     }
     $result = $adb->pquery($list_query, array($userid));
     $entries_list = array();
     if ($navigation_array['end_val'] != 0) {
         for ($i = $navigation_array['start']; $i <= $navigation_array['end_val']; $i++) {
             $entries = array();
             $userid = $adb->query_result($result, $i - 1, 'userid');
             $entries[] = getTranslatedString($adb->query_result($result, $i - 1, 'module'));
             $entries[] = $adb->query_result($result, $i - 1, 'action');
             $entries[] = $adb->query_result($result, $i - 1, 'recordid');
             $entries[] = getDisplayDate($adb->query_result($result, $i - 1, 'actiondate'));
             $entries_list[] = $entries;
         }
         $log->debug("Exiting getAuditTrailEntries() method ...");
         return $entries_list;
     }
 }
开发者ID:hardikk,项目名称:HNH,代码行数:34,代码来源:AuditTrail.php


示例2: edit

 function edit()
 {
     $mainframe = JFactory::getApplication();
     $jshopConfig = JSFactory::getConfig();
     $db = JFactory::getDBO();
     $me = JFactory::getUser();
     $user_id = JRequest::getInt("user_id");
     $user = JTable::getInstance('userShop', 'jshop');
     $user->load($user_id);
     $user_site = new JUser($user_id);
     $_countries = $this->getModel("countries");
     $countries = $_countries->getAllCountries(0);
     $lists['country'] = JHTML::_('select.genericlist', $countries, 'country', 'class = "inputbox" size = "1"', 'country_id', 'name', $user->country);
     $lists['d_country'] = JHTML::_('select.genericlist', $countries, 'd_country', 'class = "inputbox endes" size = "1"', 'country_id', 'name', $user->d_country);
     $user->birthday = getDisplayDate($user->birthday, $jshopConfig->field_birthday_format);
     $user->d_birthday = getDisplayDate($user->d_birthday, $jshopConfig->field_birthday_format);
     $option_title = array();
     foreach ($jshopConfig->user_field_title as $key => $value) {
         $option_title[] = JHTML::_('select.option', $key, $value, 'title_id', 'title_name');
     }
     $lists['select_titles'] = JHTML::_('select.genericlist', $option_title, 'title', 'class = "inputbox"', 'title_id', 'title_name', $user->title);
     $lists['select_d_titles'] = JHTML::_('select.genericlist', $option_title, 'd_title', 'class = "inputbox endes"', 'title_id', 'title_name', $user->d_title);
     $client_types = array();
     foreach ($jshopConfig->user_field_client_type as $key => $value) {
         $client_types[] = JHTML::_('select.option', $key, $value, 'id', 'name');
     }
     $lists['select_client_types'] = JHTML::_('select.genericlist', $client_types, 'client_type', 'class = "inputbox" ', 'id', 'name', $user->client_type);
     $_usergroups = $this->getModel("userGroups");
     $usergroups = $_usergroups->getAllUsergroups();
     $lists['usergroups'] = JHTML::_('select.genericlist', $usergroups, 'usergroup_id', 'class = "inputbox" size = "1"', 'usergroup_id', 'usergroup_name', $user->usergroup_id);
     $lists['block'] = JHTML::_('select.booleanlist', 'block', 'class="inputbox" size="1"', $user_site->get('block'));
     filterHTMLSafe($user, ENT_QUOTES);
     $tmp_fields = $jshopConfig->getListFieldsRegister();
     $config_fields = $tmp_fields['editaccount'];
     $count_filed_delivery = $jshopConfig->getEnableDeliveryFiledRegistration('editaccount');
     JHTML::_('behavior.calendar');
     $view = $this->getView("users", 'html');
     $view->setLayout("edit");
     $view->assign('config', $jshopConfig);
     $view->assign('user', $user);
     $view->assign('me', $me);
     $view->assign('user_site', $user_site);
     $view->assign('lists', $lists);
     $view->assign('etemplatevar', '');
     $view->assign('config_fields', $config_fields);
     $view->assign('count_filed_delivery', $count_filed_delivery);
     JPluginHelper::importPlugin('jshoppingadmin');
     $dispatcher = JDispatcher::getInstance();
     $dispatcher->trigger('onBeforeEditUsers', array(&$view));
     $view->displayEdit();
 }
开发者ID:ngogiangthanh,项目名称:damtvnewversion,代码行数:51,代码来源:users.php


示例3: getRequestedToData

function getRequestedToData()
{
    $mail_data = array();
    $mail_data['user_id'] = $_REQUEST["task_assigned_user_id"];
    $mail_data['subject'] = $_REQUEST['task_subject'];
    $mail_data['status'] = $_REQUEST['activity_mode'] == 'Task' ? $_REQUEST['taskstatus'] : $_REQUEST['eventstatus'];
    $mail_data['activity_mode'] = $_REQUEST['activity_mode'];
    $mail_data['taskpriority'] = $_REQUEST['taskpriority'];
    $mail_data['relatedto'] = $_REQUEST['task_parent_name'];
    $mail_data['contact_name'] = $_REQUEST['task_contact_name'];
    $mail_data['description'] = $_REQUEST['task_description'];
    $mail_data['assingn_type'] = $_REQUEST['task_assigntype'];
    $mail_data['group_name'] = getGroupName($_REQUEST['task_assigned_group_id']);
    $mail_data['mode'] = $_REQUEST['task_mode'];
    $value = getaddEventPopupTime($_REQUEST['task_time_start'], $_REQUEST['task_time_end'], '24');
    $start_hour = $value['starthour'] . ':' . $value['startmin'] . '' . $value['startfmt'];
    $mail_data['st_date_time'] = getDisplayDate($_REQUEST['task_date_start']) . " " . $start_hour;
    $mail_data['end_date_time'] = getDisplayDate($_REQUEST['task_due_date']);
    return $mail_data;
}
开发者ID:vtiger-jp,项目名称:vtigercrm-5.1.x-ja,代码行数:20,代码来源:TodoSave.php


示例4: step2

 function step2()
 {
     $checkout = JModelLegacy::getInstance('checkout', 'jshop');
     $checkout->checkStep(2);
     JPluginHelper::importPlugin('jshoppingcheckout');
     $dispatcher = JDispatcher::getInstance();
     $dispatcher->trigger('onLoadCheckoutStep2', array());
     $session = JFactory::getSession();
     $user = JFactory::getUser();
     $jshopConfig = JSFactory::getConfig();
     $country = JTable::getInstance('country', 'jshop');
     $checkLogin = JRequest::getInt('check_login');
     if ($checkLogin) {
         $session->set("show_pay_without_reg", 1);
         checkUserLogin();
     }
     appendPathWay(_JSHOP_CHECKOUT_ADDRESS);
     $seo = JTable::getInstance("seo", "jshop");
     $seodata = $seo->loadData("checkout-address");
     if ($seodata->title == "") {
         $seodata->title = _JSHOP_CHECKOUT_ADDRESS;
     }
     setMetaData($seodata->title, $seodata->keyword, $seodata->description);
     $cart = JModelLegacy::getInstance('cart', 'jshop');
     $cart->load();
     $cart->getSum();
     if ($user->id) {
         $adv_user = JSFactory::getUserShop();
     } else {
         $adv_user = JSFactory::getUserShopGuest();
     }
     $adv_user->birthday = getDisplayDate($adv_user->birthday, $jshopConfig->field_birthday_format);
     $adv_user->d_birthday = getDisplayDate($adv_user->d_birthday, $jshopConfig->field_birthday_format);
     $tmp_fields = $jshopConfig->getListFieldsRegister();
     $config_fields = $tmp_fields['address'];
     $count_filed_delivery = $jshopConfig->getEnableDeliveryFiledRegistration('address');
     $checkout_navigator = $this->_showCheckoutNavigation(2);
     if ($jshopConfig->show_cart_all_step_checkout) {
         $small_cart = $this->_showSmallCart(2);
     } else {
         $small_cart = '';
     }
     $view_name = "checkout";
     $view_config = array("template_path" => JPATH_COMPONENT . "/templates/" . $jshopConfig->template . "/" . $view_name);
     $view = $this->getView($view_name, getDocumentType(), '', $view_config);
     $view->setLayout("adress");
     $view->assign('select', $jshopConfig->user_field_title);
     if (!$adv_user->country) {
         $adv_user->country = $jshopConfig->default_country;
     }
     if (!$adv_user->d_country) {
         $adv_user->d_country = $jshopConfig->default_country;
     }
     $option_country[] = JHTML::_('select.option', '0', _JSHOP_REG_SELECT, 'country_id', 'name');
     $option_countryes = array_merge($option_country, $country->getAllCountries());
     $select_countries = JHTML::_('select.genericlist', $option_countryes, 'country', 'class = "inputbox" size = "1"', 'country_id', 'name', $adv_user->country);
     $select_d_countries = JHTML::_('select.genericlist', $option_countryes, 'd_country', 'class = "inputbox" size = "1"', 'country_id', 'name', $adv_user->d_country);
     foreach ($jshopConfig->user_field_title as $key => $value) {
         $option_title[] = JHTML::_('select.option', $key, $value, 'title_id', 'title_name');
     }
     $select_titles = JHTML::_('select.genericlist', $option_title, 'title', 'class = "inputbox"', 'title_id', 'title_name', $adv_user->title);
     $select_d_titles = JHTML::_('select.genericlist', $option_title, 'd_title', 'class = "inputbox"', 'title_id', 'title_name', $adv_user->d_title);
     $client_types = array();
     foreach ($jshopConfig->user_field_client_type as $key => $value) {
         $client_types[] = JHTML::_('select.option', $key, $value, 'id', 'name');
     }
     $select_client_types = JHTML::_('select.genericlist', $client_types, 'client_type', 'class = "inputbox" onchange="showHideFieldFirm(this.value)"', 'id', 'name', $adv_user->client_type);
     filterHTMLSafe($adv_user, ENT_QUOTES);
     if ($config_fields['birthday']['display'] || $config_fields['d_birthday']['display']) {
         JHTML::_('behavior.calendar');
     }
     $view->assign('config', $jshopConfig);
     $view->assign('select_countries', $select_countries);
     $view->assign('select_d_countries', $select_d_countries);
     $view->assign('select_titles', $select_titles);
     $view->assign('select_d_titles', $select_d_titles);
     $view->assign('select_client_types', $select_client_types);
     $view->assign('live_path', JURI::base());
     $view->assign('config_fields', $config_fields);
     $view->assign('count_filed_delivery', $count_filed_delivery);
     $view->assign('user', $adv_user);
     $view->assign('delivery_adress', $adv_user->delivery_adress);
     $view->assign('checkout_navigator', $checkout_navigator);
     $view->assign('small_cart', $small_cart);
     $view->assign('action', SEFLink('index.php?option=com_jshopping&controller=checkout&task=step2save', 0, 0, $jshopConfig->use_ssl));
     $dispatcher->trigger('onBeforeDisplayCheckoutStep2View', array(&$view));
     $view->display();
 }
开发者ID:ngogiangthanh,项目名称:damtvnewversion,代码行数:88,代码来源:checkout.php


示例5: get_quotestagehistory

 /**	Function used to get the Quote Stage history of the Quotes
  *	@param $id - quote id
  *	@return $return_data - array with header and the entries in format Array('header'=>$header,'entries'=>$entries_list) where as $header and $entries_list are arrays which contains header values and all column values of all entries
  */
 function get_quotestagehistory($id)
 {
     global $log;
     $log->debug("Entering get_quotestagehistory(" . $id . ") method ...");
     global $adb;
     global $mod_strings;
     global $app_strings;
     $query = 'select vtiger_quotestagehistory.*, vtiger_quotes.quote_no from vtiger_quotestagehistory inner join vtiger_quotes on vtiger_quotes.quoteid = vtiger_quotestagehistory.quoteid inner join vtiger_crmentity on vtiger_crmentity.crmid = vtiger_quotes.quoteid where vtiger_crmentity.deleted = 0 and vtiger_quotes.quoteid = ?';
     $result = $adb->pquery($query, array($id));
     $noofrows = $adb->num_rows($result);
     $header[] = $app_strings['Quote No'];
     $header[] = $app_strings['LBL_ACCOUNT_NAME'];
     $header[] = $app_strings['LBL_AMOUNT'];
     $header[] = $app_strings['Quote Stage'];
     $header[] = $app_strings['LBL_LAST_MODIFIED'];
     //Getting the field permission for the current user. 1 - Not Accessible, 0 - Accessible
     //Account Name , Total are mandatory fields. So no need to do security check to these fields.
     global $current_user;
     //If field is accessible then getFieldVisibilityPermission function will return 0 else return 1
     $quotestage_access = getFieldVisibilityPermission('Quotes', $current_user->id, 'quotestage') != '0' ? 1 : 0;
     $picklistarray = getAccessPickListValues('Quotes');
     $quotestage_array = $quotestage_access != 1 ? $picklistarray['quotestage'] : array();
     //- ==> picklist field is not permitted in profile
     //Not Accessible - picklist is permitted in profile but picklist value is not permitted
     $error_msg = $quotestage_access != 1 ? 'Not Accessible' : '-';
     while ($row = $adb->fetch_array($result)) {
         $entries = array();
         // Module Sequence Numbering
         //$entries[] = $row['quoteid'];
         $entries[] = $row['quote_no'];
         // END
         $entries[] = $row['accountname'];
         $entries[] = $row['total'];
         $entries[] = in_array($row['quotestage'], $quotestage_array) ? $row['quotestage'] : $error_msg;
         $entries[] = getDisplayDate($row['lastmodified']);
         $entries_list[] = $entries;
     }
     $return_data = array('header' => $header, 'entries' => $entries_list);
     $log->debug("Exiting get_quotestagehistory method ...");
     return $return_data;
 }
开发者ID:hardikk,项目名称:HNH,代码行数:45,代码来源:Quotes.php


示例6: edit

 function edit()
 {
     $mainframe = JFactory::getApplication();
     $order_id = JRequest::getVar("order_id");
     $client_id = JRequest::getInt('client_id', 0);
     $lang = JSFactory::getLang();
     $db = JFactory::getDBO();
     $jshopConfig = JSFactory::getConfig();
     $orders = $this->getModel("orders");
     $order = JTable::getInstance('order', 'jshop');
     $order->load($order_id);
     $name = $lang->get("name");
     $id_vendor_cuser = getIdVendorForCUser();
     if ($jshopConfig->admin_show_vendors && $id_vendor_cuser) {
         if ($order->vendor_id != $id_vendor_cuser) {
             $mainframe->redirect('index.php', JText::_('ALERTNOTAUTH'));
             return 0;
         }
     }
     $order_items = $order->getAllItems();
     $_languages = $this->getModel("languages");
     $languages = $_languages->getAllLanguages(1);
     $select_language = JHTML::_('select.genericlist', $languages, 'lang', 'class = "inputbox" style="float:none"', 'language', 'name', $order->lang);
     $country = JTable::getInstance('country', 'jshop');
     $countries = $country->getAllCountries();
     $select_countries = JHTML::_('select.genericlist', $countries, 'country', 'class = "inputbox"', 'country_id', 'name', $order->country);
     $select_d_countries = JHTML::_('select.genericlist', $countries, 'd_country', 'class = "inputbox"', 'country_id', 'name', $order->d_country);
     $option_title = array();
     foreach ($jshopConfig->user_field_title as $key => $value) {
         if ($key > 0) {
             $option_title[] = JHTML::_('select.option', $key, $value, 'title_id', 'title_name');
         }
     }
     $select_titles = JHTML::_('select.genericlist', $option_title, 'title', 'class = "inputbox"', 'title_id', 'title_name', $order->title);
     $select_d_titles = JHTML::_('select.genericlist', $option_title, 'd_title', 'class = "inputbox endes"', 'title_id', 'title_name', $order->d_title);
     $order->birthday = getDisplayDate($order->birthday, $jshopConfig->field_birthday_format);
     $order->d_birthday = getDisplayDate($order->d_birthday, $jshopConfig->field_birthday_format);
     $client_types = array();
     foreach ($jshopConfig->user_field_client_type as $key => $value) {
         $client_types[] = JHTML::_('select.option', $key, $value, 'id', 'name');
     }
     $select_client_types = JHTML::_('select.genericlist', $client_types, 'client_type', 'class = "inputbox" onchange="showHideFieldFirm(this.value)"', 'id', 'name', $order->client_type);
     $jshopConfig->user_field_client_type[0] = "";
     if (isset($jshopConfig->user_field_client_type[$order->client_type])) {
         $order->client_type_name = $jshopConfig->user_field_client_type[$order->client_type];
     } else {
         $order->client_type_name = '';
     }
     $tmp_fields = $jshopConfig->getListFieldsRegister();
     $config_fields = $tmp_fields["address"];
     $count_filed_delivery = $jshopConfig->getEnableDeliveryFiledRegistration('address');
     $pm_method = JTable::getInstance('paymentMethod', 'jshop');
     $pm_method->load($order->payment_method_id);
     $order->payment_name = $pm_method->{$name};
     $order->order_tax_list = $order->getTaxExt();
     $_currency = $this->getModel("currencies");
     $currency_list = $_currency->getAllCurrencies();
     $order_currency = 0;
     foreach ($currency_list as $k => $v) {
         if ($v->currency_code_iso == $order->currency_code_iso) {
             $order_currency = $v->currency_id;
         }
     }
     $select_currency = JHTML::_('select.genericlist', $currency_list, 'currency_id', 'class = "inputbox"', 'currency_id', 'currency_code', $order_currency);
     $display_price_list = array();
     $display_price_list[] = JHTML::_('select.option', 0, _JSHOP_PRODUCT_BRUTTO_PRICE, 'id', 'name');
     $display_price_list[] = JHTML::_('select.option', 1, _JSHOP_PRODUCT_NETTO_PRICE, 'id', 'name');
     $display_price_select = JHTML::_('select.genericlist', $display_price_list, 'display_price', 'onchange="updateOrderTotalValue();"', 'id', 'name', $order->display_price);
     $shippings = $this->getModel("shippings");
     $shippings_list = $shippings->getAllShippings(0);
     $shippings_select = JHTML::_('select.genericlist', $shippings_list, 'shipping_method_id', '', 'shipping_id', 'name', $order->shipping_method_id);
     $payments = $this->getModel("payments");
     $payments_list = $payments->getAllPaymentMethods(0);
     $payments_select = JHTML::_('select.genericlist', $payments_list, 'payment_method_id', '', 'payment_id', 'name', $order->payment_method_id);
     $deliverytimes = JSFactory::getAllDeliveryTime();
     $first = array(0 => "- - -");
     $delivery_time_select = JHTML::_('select.genericlist', array_merge($first, $deliverytimes), 'delivery_times_id', '', 'id', 'name', $order->delivery_times_id);
     $users = $this->getModel('users');
     $users_list = $users->getUsers();
     $first = array(0 => '- - -');
     $users_list_select = JHTML::_('select.genericlist', array_merge($first, $users_list), 'user_id', 'onchange="updateBillingShippingForUser(this.value);"', 'user_id', 'name', $order->user_id);
     filterHTMLSafe($order);
     foreach ($order_items as $k => $v) {
         JFilterOutput::objectHTMLSafe($order_items[$k]);
     }
     JHTML::_('behavior.calendar');
     $view = $this->getView("orders", 'html');
     $view->setLayout("edit");
     $view->assign('config', $jshopConfig);
     $view->assign('order', $order);
     $view->assign('order_items', $order_items);
     $view->assign('config_fields', $config_fields);
     $view->assign('etemplatevar', '');
     $view->assign('count_filed_delivery', $count_filed_delivery);
     $view->assign('order_id', $order_id);
     $view->assign('select_countries', $select_countries);
     $view->assign('select_d_countries', $select_d_countries);
     $view->assign('select_titles', $select_titles);
     $view->assign('select_d_titles', $select_d_titles);
     $view->assign('select_client_types', $select_client_types);
//.........这里部分代码省略.........
开发者ID:ngogiangthanh,项目名称:damtvnewversion,代码行数:101,代码来源:orders.php


示例7: getValue

function getValue($field_result, $list_result, $fieldname, $focus, $module, $entity_id, $list_result_count, $mode, $popuptype, $returnset = '', $viewid = '')
{
    global $log, $listview_max_textlength, $app_strings, $current_language, $currentModule;
    $log->debug("Entering getValue(" . $field_result . "," . $list_result . "," . $fieldname . "," . get_class($focus) . "," . $module . "," . $entity_id . "," . $list_result_count . "," . $mode . "," . $popuptype . "," . $returnset . "," . $viewid . ") method ...");
    global $adb, $current_user, $default_charset;
    require 'user_privileges/user_privileges_' . $current_user->id . '.php';
    $tabname = getParentTab();
    $tabid = getTabid($module);
    $current_module_strings = return_module_language($current_language, $module);
    $uicolarr = $field_result[$fieldname];
    foreach ($uicolarr as $key => $value) {
        $uitype = $key;
        $colname = $value;
    }
    //added for getting event status in Custom view - Jaguar
    if ($module == 'Calendar' && ($colname == "status" || $colname == "eventstatus")) {
        $colname = "activitystatus";
    }
    //Ends
    $field_val = $adb->query_result($list_result, $list_result_count, $colname);
    if (stristr(html_entity_decode($field_val), "<a href") === false && $uitype != 8) {
        $temp_val = textlength_check($field_val);
    } elseif ($uitype != 8) {
        $temp_val = html_entity_decode($field_val, ENT_QUOTES);
    } else {
        $temp_val = $field_val;
    }
    // vtlib customization: New uitype to handle relation between modules
    if ($uitype == '10') {
        $parent_id = $field_val;
        if (!empty($parent_id)) {
            $parent_module = getSalesEntityType($parent_id);
            $valueTitle = $parent_module;
            if ($app_strings[$valueTitle]) {
                $valueTitle = $app_strings[$valueTitle];
            }
            $displayValueArray = getEntityName($parent_module, $parent_id);
            if (!empty($displayValueArray)) {
                foreach ($displayValueArray as $key => $value) {
                    $displayValue = $value;
                }
            }
            $value = "<a href='index.php?module={$parent_module}&action=DetailView&record={$parent_id}' title='{$valueTitle}'>{$displayValue}</a>";
        } else {
            $value = '';
        }
    } else {
        if ($uitype == 53) {
            $value = textlength_check($adb->query_result($list_result, $list_result_count, 'user_name'));
            // When Assigned To field is used in Popup window
            if ($value == '') {
                $user_id = $adb->query_result($list_result, $list_result_count, 'smownerid');
                if ($user_id != null && $user_id != '') {
                    $value = getOwnerName($user_id);
                }
            }
        } elseif ($uitype == 52) {
            $value = getUserName($adb->query_result($list_result, $list_result_count, $colname));
        } elseif ($uitype == 51) {
            $parentid = $adb->query_result($list_result, $list_result_count, "parentid");
            if ($module == 'Accounts') {
                $entity_name = textlength_check(getAccountName($parentid));
            } elseif ($module == 'Products') {
                $entity_name = textlength_check(getProductName($parentid));
            }
            $value = '<a href="index.php?module=' . $module . '&action=DetailView&record=' . $parentid . '&parenttab=' . $tabname . '" style="' . $P_FONT_COLOR . '">' . $entity_name . '</a>';
        } elseif ($uitype == 77) {
            $value = getUserName($adb->query_result($list_result, $list_result_count, 'inventorymanager'));
        } elseif ($uitype == 5 || $uitype == 6 || $uitype == 23 || $uitype == 70) {
            if ($temp_val != '' && $temp_val != '0000-00-00') {
                $value = getDisplayDate($temp_val);
            } elseif ($temp_val == '0000-00-00') {
                $value = '';
            } else {
                $value = $temp_val;
            }
        } elseif ($uitype == 15 || $uitype == 55 && $fieldname == "salutationtype") {
            $temp_val = decode_html($adb->query_result($list_result, $list_result_count, $colname));
            if ($is_admin == false && $profileGlobalPermission[1] == 1 && $profileGlobalPermission[2] == 1 && $temp_val != '') {
                $temp_acttype = $adb->query_result($list_result, $list_result_count, 'activitytype');
                if ($temp_acttype != 'Task' && $fieldname == "taskstatus") {
                    $temptable = "eventstatus";
                } else {
                    $temptable = $fieldname;
                }
                $roleid = $current_user->roleid;
                $roleids = array();
                $subrole = getRoleSubordinates($roleid);
                if (count($subrole) > 0) {
                    $roleids = $subrole;
                }
                array_push($roleids, $roleid);
                //here we are checking wheather the table contains the sortorder column .If  sortorder is present in the main picklist table, then the role2picklist will be applicable for this table...
                $sql = "select * from vtiger_{$temptable} where {$temptable}=?";
                $res = $adb->pquery($sql, array(decode_html($temp_val)));
                $picklistvalueid = $adb->query_result($res, 0, 'picklist_valueid');
                if ($picklistvalueid != null) {
                    $pick_query = "select * from vtiger_role2picklist where picklistvalueid={$picklistvalueid} and roleid in (" . generateQuestionMarks($roleids) . ")";
                    $res_val = $adb->pquery($pick_query, array($roleids));
                    $num_val = $adb->num_rows($res_val);
//.........这里部分代码省略.........
开发者ID:latechdirect,项目名称:vtiger,代码行数:101,代码来源:ListViewUtils.php


示例8: getValue

function getValue($uitype, $list_result, $fieldname, $focus, $module, $entity_id, $list_result_count, $mode, $popuptype, $returnset = '', $viewid = '')
{
    global $log;
    global $app_strings;
    //changed by dingjianting on 2007-11-05 for php5.2.x
    $log->debug("Entering getValue() method ...");
    global $adb, $current_user;
    if ($uitype == 10) {
        $temp_val = $adb->query_result($list_result, $list_result_count, $fieldname);
        if ($temp_val != "") {
            $value = "";
            $module_entityname = "";
            $modulename_lower = substr($fieldname, 0, -2);
            $modulename = ucfirst($modulename_lower);
            $modulesid = $modulename_lower . "id";
            $tablename = "ec_" . $modulename_lower;
            $entityname = substr($fieldname, 0, -3) . "name";
            $query = "SELECT {$entityname} FROM {$tablename} WHERE {$modulesid}='" . $temp_val . "' and deleted=0";
            $fldmod_result = $adb->query($query);
            $rownum = $adb->num_rows($fldmod_result);
            if ($rownum > 0) {
                $value = $adb->query_result($fldmod_result, 0, $entityname);
            }
        } else {
            $value = '';
        }
    } elseif ($uitype == 52 || $uitype == 53 || $uitype == 77) {
        $value = $adb->query_result($list_result, $list_result_count, 'user_name');
    } elseif ($uitype == 5 || $uitype == 6 || $uitype == 23 || $uitype == 70) {
        $temp_val = $adb->query_result($list_result, $list_result_count, $fieldname);
        if (isValidDate($temp_val)) {
            $value = getDisplayDate($temp_val);
        } else {
            $value = '';
        }
    } elseif ($uitype == 33) {
        $temp_val = $adb->query_result($list_result, $list_result_count, $fieldname);
        $value = str_ireplace(' |##| ', ', ', $temp_val);
    } elseif ($uitype == 17) {
        $temp_val = $adb->query_result($list_result, $list_result_count, $fieldname);
        $value = '<a href="http://' . $temp_val . '" target="_blank">' . $temp_val . '</a>';
    } elseif ($uitype == 13 || $uitype == 104) {
        $temp_val = $adb->query_result($list_result, $list_result_count, $fieldname);
        $value = '<a href="' . getComposeMailUrl($temp_val) . '" target="_blank">' . $temp_val . '</a>';
    } elseif ($uitype == 56) {
        $temp_val = $adb->query_result($list_result, $list_result_count, $fieldname);
        if ($temp_val == 1) {
            $value = 'yes';
        } else {
            $value = 'no';
        }
        //changed by dingjianting on 2006-10-15 for simplized chinese
        if (isset($app_strings[$value])) {
            $value = $app_strings[$value];
        }
    } elseif ($uitype == 51 || $uitype == 73 || $uitype == 50) {
        $temp_val = $adb->query_result($list_result, $list_result_count, $fieldname);
        if ($temp_val != '') {
            $value = getAccountName($temp_val);
        } else {
            $value = '';
        }
    } elseif ($uitype == 59) {
        $temp_val = $adb->query_result($list_result, $list_result_count, $fieldname);
        if ($temp_val != '') {
            $value = getProductName($temp_val);
        } else {
            $value = '';
        }
    } elseif ($uitype == 76) {
        $temp_val = $adb->query_result($list_result, $list_result_count, $fieldname);
        if ($temp_val != '') {
            $value = getPotentialName($temp_val);
        } else {
            $value = '';
        }
    } elseif ($uitype == 80) {
        $temp_val = $adb->query_result($list_result, $list_result_count, $fieldname);
        if ($temp_val != '') {
            $value = getSoName($temp_val);
        } else {
            $value = '';
        }
    } elseif ($uitype == 1004) {
        $value = $adb->query_result($list_result, $list_result_count, 'smcreatorid');
        $value = getUserName($value);
    } elseif ($uitype == 1007) {
        $temp_val = $adb->query_result($list_result, $list_result_count, $fieldname);
        $value = getApproveStatusById($temp_val);
    } elseif ($uitype == 1008) {
        $value = $adb->query_result($list_result, $list_result_count, 'approvedby');
        $value = getUserName($value);
    } elseif ($uitype == 1004) {
        $temp_val = $adb->query_result($list_result, $list_result_count, $fieldname);
        $value = getUserName($temp_val);
    } elseif ($uitype == 1007) {
        $temp_val = $adb->query_result($list_result, $list_result_count, $fieldname);
        if ($temp_val == '1') {
            $value = $app_strings["already_approved"];
        } elseif ($temp_val == '-1') {
//.........这里部分代码省略.........
开发者ID:honj51,项目名称:taobaocrm,代码行数:101,代码来源:ListViewUtils.php


示例9: getPendingActivities

/**
 * Function to get Pending/Upcoming activities
 * @param integer  $mode     - number to differentiate upcoming and pending activities
 * return array    $values   - activities record in array format
 */
function getPendingActivities($mode, $view = '')
{
    global $log;
    $log->debug("Entering getPendingActivities() method ...");
    require_once 'data/Tracker.php';
    require_once 'include/utils/utils.php';
    require_once 'user_privileges/default_module_view.php';
    global $currentModule;
    global $singlepane_view;
    global $theme;
    global $focus;
    global $action;
    global $adb;
    global $app_strings;
    global $current_language;
    global $current_user;
    $current_module_strings = return_module_language($current_language, 'Calendar');
    $theme_path = "themes/" . $theme . "/";
    $image_path = $theme_path . "images/";
    if ($_REQUEST['activity_view'] == '') {
        $activity_view = 'today';
    } else {
        $activity_view = vtlib_purify($_REQUEST['activity_view']);
    }
    $today = date("Y-m-d", time());
    if ($view == 'today') {
        $upcoming_condition = " AND (date_start = '{$today}' OR vtiger_recurringevents.recurringdate = '{$today}')";
        $pending_condition = " AND (due_date = '{$today}' OR vtiger_recurringevents.recurringdate = '{$today}')";
    } else {
        if ($view == 'all') {
            $upcoming_condition = " AND (date_start >= '{$today}' OR vtiger_recurringevents.recurringdate >= '{$today}')";
            $pending_condition = " AND (due_date <= '{$today}' OR vtiger_recurringevents.recurringdate <= '{$today}')";
        }
    }
    if ($mode != 1) {
        $list_query = " select vtiger_crmentity.crmid,vtiger_crmentity.smownerid,vtiger_crmentity." . "setype, vtiger_recurringevents.recurringdate, vtiger_activity.activityid, " . "vtiger_activity.activitytype, vtiger_activity.date_start, vtiger_activity.due_date," . "from vtiger_activity inner join vtiger_crmentity on vtiger_crmentity.crmid=" . "vtiger_activity.activityid LEFT JOIN vtiger_groups ON vtiger_groups.groupid = " . "vtiger_crmentity.smownerid left outer join vtiger_recurringevents on " . "vtiger_recurringevents.activityid=vtiger_activity.activityid";
        $list_query .= getNonAdminAccessControlQuery('Calendar', $current_user);
        $list_query .= " WHERE vtiger_crmentity.deleted=0 and vtiger_activity.activitytype not in " . "('Emails') AND ( vtiger_activity.status is NULL OR vtiger_activity.status not in" . "('Completed','Deferred')) and ( vtiger_activity.eventstatus is NULL OR vtiger_activity." . "eventstatus not in ('Held','Not Held') )" . $upcoming_condition;
    } else {
        $list_query = "select vtiger_crmentity.crmid,vtiger_crmentity.smownerid,vtiger_crmentity" . "setype, vtiger_recurringevents.recurringdate, vtiger_activity.activityid, vtiger_activity" . ".activitytype, vtiger_activity.date_start, vtiger_activity.due_date, from vtiger_activity" . "inner join vtiger_crmentity on vtiger_crmentity.crmid=vtiger_activity.activityid " . "LEFT JOIN vtiger_groups ON vtiger_groups.groupid = vtiger_crmentity.smownerid " . "left outer join vtiger_recurringevents on vtiger_recurringevents.activityid=" . "vtiger_activity.activityid";
        $list_query .= getNonAdminAccessControlQuery('Calendar', $current_user);
        $list_query .= "WHERE vtiger_crmentity.deleted=0 and (vtiger_activity." . "activitytype not in ('Emails')) AND (vtiger_activity.status is NULL OR vtiger_activity." . "status not in ('Completed','Deferred')) and (vtiger_activity.eventstatus is NULL OR " . "vtiger_activity.eventstatus not in ('Held','Not Held')) " . $pending_condition;
        $list_query .= " GROUP BY vtiger_activity.activityid";
        $list_query .= " ORDER BY date_start,time_start ASC";
        $res = $adb->query($list_query);
        $noofrecords = $adb->num_rows($res);
        $open_activity_list = array();
        $noofrows = $adb->num_rows($res);
        if (count($res) > 0) {
            for ($i = 0; $i < $noofrows; $i++) {
                $open_activity_list[] = array('name' => $adb->query_result($res, $i, 'subject'), 'id' => $adb->query_result($res, $i, 'activityid'), 'type' => $adb->query_result($res, $i, 'activitytype'), 'module' => $adb->query_result($res, $i, 'setype'), 'date_start' => getDisplayDate($adb->query_result($res, $i, 'date_start')), 'due_date' => getDisplayDate($adb->query_result($res, $i, 'due_date')), 'recurringdate' => getDisplayDate($adb->query_result($res, $i, 'recurringdate')), 'priority' => $adb->query_result($res, $i, 'priority'));
            }
        }
        $title = array();
        $title[] = $view;
        $title[] = 'myUpcoPendAct.gif';
        $title[] = 'home_myact';
        $title[] = 'showActivityView';
        $title[] = 'MyUpcumingFrm';
        $title[] = 'activity_view';
        $header = array();
        $header[] = $current_module_strings['LBL_LIST_SUBJECT'];
        $header[] = 'Type';
        $return_url = "&return_module={$currentModule}&return_action=DetailView&return_id=" . (is_object($focus) ? $focus->id : "");
        $oddRow = true;
        $entries = array();
        foreach ($open_activity_list as $event) {
            $recur_date = preg_replace('/--/', '', $event['recurringdate']);
            if ($recur_date != "") {
                $event['date_start'] = $event['recurringdate'];
            }
            $font_color_high = "color:#00DD00;";
            $font_color_medium = "color:#DD00DD;";
            switch ($event['priority']) {
                case 'High':
                    $font_color = $font_color_high;
                    break;
                case 'Medium':
                    $font_color = $font_color_medium;
                    break;
                default:
                    $font_color = '';
            }
            if ($event['type'] != 'Task' && $event['type'] != 'Emails' && $event['type'] != '') {
                $activity_type = 'Events';
            } else {
                $activity_type = 'Task';
            }
        }
        $entries[$event['id']] = array('0' => '<a href="index.php?action=DetailView&module=' . $event["module"] . '&activity_mode=' . $activity_type . '&record=' . $event["id"] . '' . $return_url . '" style="' . $font_color . ';">' . $event["name"] . '</a>', 'IMAGE' => '<IMG src="' . $image_path . $event["type"] . 's.gif">');
    }
    $values = array('noofactivities' => $noofrecords, 'Title' => $title, 'Header' => $header, 'Entries' => $entries);
    $log->debug("Exiting getPendingActivities method ...");
    return $values;
}
开发者ID:hardikk,项目名称:HNH,代码行数:100,代码来源:OpenListView.php


示例10: CRMSmarty

global $currentModule;
global $app_strings;
global $app_list_strings;
global $moduleList;
global $theme;
$theme_path = "themes/" . $theme . "/";
$image_path = $theme_path . "images/";
require_once $theme_path . 'layout_utils.php';
$smarty = new CRMSmarty();
$header_array = getHeaderArray();
$smarty->assign("HEADERS", $header_array);
$smarty->assign("THEME", $theme);
$smarty->assign("IMAGEPATH", $image_path);
$smarty->assign("APP", $app_strings);
$smarty->assign("MODULE_NAME", $currentModule);
$smarty->assign("DATE", getDisplayDate(date("Y-m-d H:i")));
$smarty->assign("CURRENT_USER", $current_user->user_name);
$smarty->assign("CURRENT_USER_ID", $current_user->id);
$smarty->assign("MODULELISTS", $app_list_strings['moduleList']);
$smarty->assign("CATEGORY", getParentTab());
//$smarty->assign("ANNOUNCEMENT",get_announcements());
$module_path = "modules/" . $currentModule . "/";
///auth
$nowdate = date("Ymd");
$auth = md5($nowdate . $current_user->email2);
$smarty->assign("AUTH", $auth);
//NEW taobao
if ($_REQUEST['ac'] == 'logout') {
    $_SESSION['topsession'] = '';
    $_SESSION['nick'] = '';
    //echo "<script>window.close();</script>";
开发者ID:ruckfull,项目名称:taobaocrm,代码行数:31,代码来源:header_bf.php


示例11: get_payment_history

 /**	Function used to get the Payments Stage history of the CobroPago
  *	@param $id - cobropagoid
  *	return $return_data - array with header and the entries in format Array('header'=>$header,'entries'=>$entries_list) where as $header and $entries_list are array which contains all the column values of an row
  */
 function get_payment_history($id)
 {
     global $log;
     $log->debug("Entering get_stage_history(" . $id . ") method ...");
     global $adb;
     global $mod_strings;
     global $app_strings;
     $query = 'select vtiger_potstagehistory.*, vtiger_cobropago.reference from vtiger_potstagehistory inner join vtiger_cobropago on vtiger_cobropago.cobropagoid = vtiger_potstagehistory.cobropagoid inner join vtiger_crmentity on vtiger_crmentity.crmid = vtiger_cobropago.cobropagoid where vtiger_crmentity.deleted = 0 and vtiger_cobropago.cobropagoid = ?';
     $result = $adb->pquery($query, array($id));
     $noofrows = $adb->num_rows($result);
     $header[] = $app_strings['LBL_AMOUNT'];
     $header[] = $app_strings['LBL_SALES_STAGE'];
     $header[] = $app_strings['LBL_PROBABILITY'];
     $header[] = $app_strings['LBL_CLOSE_DATE'];
     $header[] = $app_strings['LBL_LAST_MODIFIED'];
     //Getting the field permission for the current user. 1 - Not Accessible, 0 - Accessible
     //Sales Stage, Expected Close Dates are mandatory fields. So no need to do security check to these fields.
     global $current_user;
     //If field is accessible then getFieldVisibilityPermission function will return 0 else return 1
     $amount_access = getFieldVisibilityPermission('CobroPago', $current_user->id, 'amount') != '0' ? 1 : 0;
     $probability_access = getFieldVisibilityPermission('CobroPago', $current_user->id, 'probability') != '0' ? 1 : 0;
     $picklistarray = getAccessPickListValues('CobroPago');
     $potential_stage_array = $picklistarray['sales_stage'];
     //- ==> picklist field is not permitted in profile
     //Not Accessible - picklist is permitted in profile but picklist value is not permitted
     $error_msg = 'Not Accessible';
     while ($row = $adb->fetch_array($result)) {
         $entries = array();
         $entries[] = $amount_access != 1 ? $row['amount'] : 0;
         $entries[] = in_array($row['stage'], $potential_stage_array) ? $row['stage'] : $error_msg;
         $entries[] = $probability_access != 1 ? $row['probability'] : 0;
         $entries[] = getDisplayDate($row['closedate']);
         $entries[] = getDisplayDate($row['lastmodified']);
         $entries_list[] = $entries;
     }
     $return_data = array('header' => $header, 'entries' => $entries_list);
     $log->debug("Exiting get_stage_history method ...");
     return $return_data;
 }
开发者ID:jaimeaga84,项目名称:corebos,代码行数:43,代码来源:CobroPago.php


示例12: create_contact1

function create_contact1($user_name, $first_name, $last_name, $email_address, $account_name, $salutation, $title, $phone_mobile, $reports_to, $primary_address_street, $primary_address_city, $primary_address_state, $primary_address_postalcode, $primary_address_country, $alt_address_city, $alt_address_street, $alt_address_state, $alt_address_postalcode, $alt_address_country, $office_phone, $home_phone, $other_phone, $fax, $department, $birthdate, $assistant_name, $assistant_phone, $description = '')
{
    global $adb, $log;
    global $current_user;
    require_once 'modules/Users/Users.php';
    $seed_user = new Users();
    $user_id = $seed_user->retrieve_user_id($user_name);
    $current_user = $seed_user;
    $current_user->retrieve_entity_info($user_id, 'Users');
    require_once 'modules/Contacts/Contacts.php';
    if (isPermitted("Contacts", "EditView") == "yes") {
        $contact = new Contacts();
        $contact->column_fields[firstname] = $first_name;
        $contact->column_fields[lastname] = $last_name;
        //$contact->column_fields[account_id]=retrieve_account_id($account_name,$user_id);// NULL value is not supported NEED TO FIX
        $contact->column_fields[salutation] = $salutation;
        // EMAIL IS NOT ADDED
        $contact->column_fields[title] = $title;
        $contact->column_fields[email] = $email_address;
        $contact->column_fields[mobile] = $phone_mobile;
        //$contact->column_fields[reports_to_id] =retrievereportsto($reports_to,$user_id,$account_id);// NOT FIXED IN SAVEENTITY.PHP
        $contact->column_fields[mailingstreet] = $primary_address_street;
        $contact->column_fields[mailingcity] = $primary_address_city;
        $contact->column_fields[mailingcountry] = $primary_address_country;
        $contact->column_fields[mailingstate] = $primary_address_state;
        $contact->column_fields[mailingzip] = $primary_address_postalcode;
        $contact->column_fields[otherstreet] = $alt_address_street;
        $contact->column_fields[othercity] = $alt_address_city;
        $contact->column_fields[othercountry] = $alt_address_country;
        $contact->column_fields[otherstate] = $alt_address_state;
        $contact->column_fields[otherzip] = $alt_address_postalcode;
        $contact->column_fields[assigned_user_id] = $user_id;
        // new Fields
        $contact->column_fields[phone] = $office_phone;
        $contact->column_fields[homephone] = $home_phone;
        $contact->column_fields[otherphone] = $other_phone;
        $contact->column_fields[fax] = $fax;
        $contact->column_fields[department] = $department;
        $contact->column_fields[birthday] = getDisplayDate($birthdate);
        $contact->column_fields[assistant] = $assistant_name;
        $contact->column_fields[assistantphone] = $assistant_phone;
        $contact->column_fields[description] = $description;
        $contact->save("Contacts");
        if ($contact->id != '') {
            return 'Contact added successfully';
        } else {
            return "Contact creation failed. Try again";
        }
    } else {
        return $accessDenied;
    }
}
开发者ID:hardikk,项目名称:HNH,代码行数:52,代码来源:firefoxtoolbar.php


示例13: formatDate


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP getDistance函数代码示例发布时间:2022-05-15
下一篇:
PHP getDirectorySize函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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