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

PHP NavigationControl类代码示例

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

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



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

示例1: eventActivatePlugin

 /**
  * event function to activate a plugin from setting page
  * @param object $evctl
  */
 public function eventActivatePlugin(EventControler $evctl)
 {
     $permission = $_SESSION["do_user"]->is_admin == 1 ? true : false;
     if (true === $permission) {
         if (trim($evctl->plugin_name) != '') {
             if (false === $this->get_plugin_by_name($evctl->plugin_name)) {
                 $this->addNew();
                 $this->name = trim($evctl->plugin_name);
                 $this->add();
                 $plugin_id = $this->getInsertId();
                 $this->do_sorting_on_activate(trim($evctl->plugin_name));
                 echo $plugin_id;
             }
         }
     } else {
         $_SESSION["do_crm_messages"]->set_message('error', _('You do not have permission to delete record !'));
         $next_page = NavigationControl::getNavigationLink("Settings", "plugins");
         $dis = new Display($next_page);
         $evctl->setDisplayNext($dis);
     }
 }
开发者ID:sQcrm,项目名称:sqcrm,代码行数:25,代码来源:PluginSettings.class.php


示例2: eventUpdateModuleDataShareRel

 /**
  * function to update the datashare permission across the module
  * @param object $evctl
  */
 public function eventUpdateModuleDataShareRel(EventControler $evctl)
 {
     $permission = $_SESSION["do_user"]->is_admin == 1 ? true : false;
     if (true === $permission) {
         $qry = "select idmodule_datashare_rel,idmodule from `" . $this->getTable() . "`";
         $stmt = $this->getDbConnection()->executeQuery($qry);
         while ($data = $stmt->fetch()) {
             $datashare_permission_form_name = 'mod_' . $data["idmodule"];
             $permission_flag = $evctl->{$datashare_permission_form_name};
             $this->cleanValues();
             $this->permission_flag = $permission_flag;
             $this->update($data["idmodule_datashare_rel"]);
         }
         $dis = new Display($evctl->next_page);
         $evctl->setDisplayNext($dis);
     } else {
         $_SESSION["do_crm_messages"]->set_message('error', _('You do not have permission to add record ! '));
         $next_page = NavigationControl::getNavigationLink("Settings", "index");
         $dis = new Display($next_page);
         $evctl->setDisplayNext($dis);
     }
 }
开发者ID:sQcrm,项目名称:sqcrm,代码行数:26,代码来源:ModuleToDatashareRelation.class.php


示例3: eventEditComboValues

 /**
  * function to edit the combo values
  * @param object $evctl
  */
 public function eventEditComboValues(EventControler $evctl)
 {
     $idfields = (int) $evctl->idfields;
     if ($idfields > 0) {
         $referrar_module_id = (int) $evctl->referrar_module_id;
         $pick_values_seperated = preg_split('/[\\r\\n]+/', $evctl->pick_values, -1, PREG_SPLIT_NO_EMPTY);
         $this->update_combo_values($idfields, $pick_values_seperated);
         //check if the field is mapped with some other fields and if yes then update the mapped fields also
         $do_crm_fields_mapping = new CRMFieldsMapping();
         $mapped_fields = $do_crm_fields_mapping->is_mapped($idfields);
         if (is_array($mapped_fields) && count($mapped_fields) > 0) {
             foreach ($mapped_fields as $mapped_fieldid) {
                 $this->update_combo_values($mapped_fieldid, $pick_values_seperated);
             }
         }
         $_SESSION["do_crm_messages"]->set_message('success', _('Data has been updated successfully.'));
         $next_page = NavigationControl::getNavigationLink("Settings", "picklist");
         $dis = new Display($next_page);
         $dis->addParam("cmid", $referrar_module_id);
         $evctl->setDisplayNext($dis);
     }
 }
开发者ID:sQcrm,项目名称:sqcrm,代码行数:26,代码来源:ComboValues.class.php


示例4: eventAjaxLoadRecentlyViewed

    /**
     * event function to load the recently viewed infomation
     * @param object $evctl
     * @return string html
     */
    function eventAjaxLoadRecentlyViewed(EventControler $evctl)
    {
        $html = '';
        $iduser = $_SESSION["do_user"]->iduser;
        $this->get_recently_viewed($iduser);
        if ($this->getNumRows() > 0) {
            $do_crm_entity = new CRMEntity();
            $html .= '<ul id="recently_viewed">
						<li><a href="" class="current">' . _('Recently Viewed') . '</a></li>
					';
            while ($this->next()) {
                $identifier = '';
                $record_url = '';
                $module = $_SESSION["do_module"]->modules_full_details[$this->idmodule]["name"];
                $identifier = $do_crm_entity->get_entity_identifier($this->idrecord, $module);
                $record_url = NavigationControl::getNavigationLink($module, "detail", $this->idrecord);
                $html .= '<li><a href="' . $record_url . '">' . $identifier . '</a></li>';
            }
            $html .= '</ul>';
        }
        echo $html;
    }
开发者ID:sQcrm,项目名称:sqcrm,代码行数:27,代码来源:CRMEntityRecentlyViewed.class.php


示例5: Roles

$do_roles = new Roles();
?>
<div class="container-fluid">
	<div class="row">
		<?php 
include_once "modules/Settings/settings_leftmenu.php";
?>
		<div class="col-md-9">
			<div class="box_content">
				<ol class="breadcrumb">
					<li class="active"><?php 
echo _('Settings');
?>
</li>
					<li><a href="<?php 
echo NavigationControl::getNavigationLink($module, "roles_list");
?>
"><?php 
echo _('Roles');
?>
</a></li>
				</ol>
				<p class="lead"><?php 
echo _('Manage Roles hierarchy for users');
?>
</p> 
			</div>
			<div class="datadisplay-outer">
				<h2><small class="text-muted"><?php 
echo _('Tree view of roles and hierarchy');
?>
开发者ID:sQcrm,项目名称:sqcrm,代码行数:31,代码来源:roles_list.php


示例6: SalesOrder

$inv_terms_cond = $do_global_settings->get_inventory_terms_condition();
$tems_condition = $inv_terms_cond["salesorder_terms_condition"];
$module_obj = new SalesOrder();
$module_obj->getId($sqcrm_record_id);
$do_lineitems = new Lineitems();
$do_lineitems->get_line_items($module_id, $sqcrm_record_id);
$do_products = new Products();
$lineitems = array();
if ($do_lineitems->getNumRows() > 0) {
    while ($do_lineitems->next()) {
        $product_available_tax = '';
        if ($do_lineitems->item_type == 'product') {
            $product_available_tax = $do_products->get_products_tax($do_lineitems->item_value);
        }
        $lineitems[] = array("idlineitems" => $do_lineitems->idlineitems, "item_type" => $do_lineitems->item_type, "item_name" => $do_lineitems->item_name, "item_value" => $do_lineitems->item_value, "item_description" => $do_lineitems->item_description, "item_quantity" => $do_lineitems->item_quantity, "item_price" => $do_lineitems->item_price, "discount_type" => $do_lineitems->discount_type, "discount_value" => $do_lineitems->discount_value, "discounted_amount" => $do_lineitems->discounted_amount, "tax_values" => $do_lineitems->tax_values, "product_available_tax" => $product_available_tax, "taxed_amount" => $do_lineitems->taxed_amount, "total_after_discount" => $do_lineitems->total_after_discount, "total_after_tax" => $do_lineitems->total_after_tax, "net_total" => $do_lineitems->net_total);
    }
}
//print_r($lineitems);
if (isset($_GET["return_page"]) && $_GET["return_page"] != '') {
    $return = $_GET["return_page"];
    $cancel_return = NavigationControl::getNavigationLink($module, $return, $sqcrm_record_id);
} else {
    $cancel_return = NavigationControl::getNavigationLink($module, "list");
}
//Assigned to iduser or group ?
if ($module_obj->iduser > 0) {
    $assigned_to = 'user_' . $module_obj->iduser;
} elseif ($module_obj->idgroup > 0) {
    $assigned_to = 'group_' . $module_obj->idgroup;
}
require_once 'view/edit_view.php';
开发者ID:sQcrm,项目名称:sqcrm,代码行数:31,代码来源:edit.php


示例7: eventEditRecord

 /**
  * Event function to update the organization data
  * @param object $evctl
  */
 public function eventEditRecord(EventControler $evctl)
 {
     $id_entity = (int) $evctl->sqrecord;
     if ($id_entity > 0 && true === $_SESSION["do_crm_action_permission"]->action_permitted('edit', 11, (int) $evctl->sqrecord)) {
         $obj = $this->getId($id_entity);
         $obj = (object) $obj;
         // convert the data array to Object
         $do_process_plugins = new CRMPluginProcessor();
         // process before update plugin. If any error is raised display that.
         $do_process_plugins->process_action_plugins((int) $evctl->idmodule, $evctl, 3, $id_entity, $obj);
         if (strlen($do_process_plugins->get_error()) > 2) {
             $_SESSION["do_crm_messages"]->set_message('error', $do_process_plugins->get_error());
             $next_page = NavigationControl::getNavigationLink($evctl->module, "edit");
             $dis = new Display($next_page);
             $dis->addParam("sqrecord", $id_entity);
             if ($evctl->return_page != '') {
                 $dis->addParam("return_page", $evctl->return_page);
             }
             $evctl->setDisplayNext($dis);
         } else {
             $do_crm_fields = new CRMFields();
             $crm_fields = $do_crm_fields->get_field_information_by_module_as_array((int) $evctl->idmodule);
             $table_entity = 'vendor';
             $table_entity_address = 'vendor_address';
             $table_entity_custom = 'vendor_custom_fld';
             $table_entity_to_grp = 'vendor_to_grp_rel';
             $entity_data_array = array();
             $custom_data_array = array();
             $addr_data_array = array();
             $assigned_to_as_group = false;
             foreach ($crm_fields as $crm_fields) {
                 $field_name = $crm_fields["field_name"];
                 $field_value = $do_crm_fields->convert_field_value_onsave($crm_fields, $evctl, 'edit');
                 if (is_array($field_value) && count($field_value) > 0) {
                     if ($field_value["field_type"] == 15) {
                         $field_name = 'iduser';
                         $value = $field_value["value"];
                         $assigned_to_as_group = $field_value["assigned_to_as_group"];
                         $group_id = $field_value["group_id"];
                     } elseif ($field_value["field_type"] == 12) {
                         $value = $field_value["name"];
                         $avatar_array[] = $field_value;
                     }
                 } else {
                     $value = $field_value;
                 }
                 if ($crm_fields["table_name"] == $table_entity && $crm_fields["idblock"] > 0) {
                     $entity_data_array[$field_name] = $value;
                 }
                 if ($crm_fields["table_name"] == $table_entity_address && $crm_fields["idblock"] > 0) {
                     $addr_data_array[$field_name] = $value;
                 }
                 if ($crm_fields["table_name"] == $table_entity_custom && $crm_fields["idblock"] > 0) {
                     $custom_data_array[$field_name] = $value;
                 }
             }
             $this->update(array($this->primary_key => $id_entity), $table_entity, $entity_data_array);
             //updating the last_modified,last_modified_by
             $q_upd = "\n\t\t\t\tupdate `" . $this->getTable() . "` set \n\t\t\t\t`last_modified` = ? ,\n\t\t\t\t`last_modified_by` = ? \n\t\t\t\twhere `" . $this->primary_key . "` = ?";
             $this->query($q_upd, array(date("Y-m-d H:i:s"), $_SESSION["do_user"]->iduser, $id_entity));
             if (count($custom_data_array) > 0) {
                 $this->update(array($this->primary_key => $id_entity), $table_entity_custom, $custom_data_array);
             }
             if (count($addr_data_array) > 0) {
                 $this->update(array($this->primary_key => $id_entity), $table_entity_address, $addr_data_array);
             }
             if ($assigned_to_as_group === false) {
                 $qry_grp_rel = "DELETE from `{$table_entity_to_grp}` where idvendor = ? LIMIT 1";
                 $this->query($qry_grp_rel, array($id_entity));
             } else {
                 $qry_grp_rel = "select * from `{$table_entity_to_grp}` where idvendor = ?";
                 $this->query($qry_grp_rel, array($id_entity));
                 if ($this->getNumRows() > 0) {
                     $this->next();
                     $id_grp_rel = $this->idvendor_to_grp_rel;
                     $q_upd = "\n\t\t\t\t\t\tupdate `{$table_entity_to_grp}` set \n\t\t\t\t\t\t`idgroup` = ?\n\t\t\t\t\t\twhere `idvendor_to_grp_rel` = ? LIMIT 1";
                     $this->query($q_upd, array($group_id, $id_grp_rel));
                 } else {
                     $this->insert($table_entity_to_grp, array("idvendor" => $id_entity, "idgroup" => $group_id));
                 }
             }
             // Record the history
             $do_data_history = new DataHistory();
             $do_data_history->add_history($id_entity, (int) $evctl->idmodule, 'edit');
             $do_data_history->add_history_value_changes($id_entity, (int) $evctl->idmodule, $obj, $evctl);
             //record the feed
             $feed_other_assigne = array();
             if ($assigned_to_as_group === true) {
                 $feed_other_assigne = array("related" => "group", "data" => array("key" => "newgroup", "val" => $group_id));
             }
             $do_feed_queue = new LiveFeedQueue();
             $do_feed_queue->add_feed_queue($id_entity, (int) $evctl->idmodule, $evctl->vendor_name, 'edit', $feed_other_assigne);
             // process after update plugin
             $do_process_plugins->process_action_plugins((int) $evctl->idmodule, $evctl, 4, $id_entity, $obj);
             $_SESSION["do_crm_messages"]->set_message('success', _('Data updated successfully !'));
             $next_page = NavigationControl::getNavigationLink($evctl->module, "detail");
//.........这里部分代码省略.........
开发者ID:sQcrm,项目名称:sqcrm,代码行数:101,代码来源:Vendor.class.php


示例8: eventActivateCpanelLogin

 /**
  * event function to activate the cpanel login
  * @param object $evctl
  * @return void
  */
 function eventActivateCpanelLogin(EventControler $evctl)
 {
     if ((int) $evctl->record_id > 0) {
         $this->getId((int) $evctl->record_id);
         $err = '';
         if ((int) $this->idorganization == 0) {
             $err = _('Contact must be associated with an organization for portal login activation');
         }
         if (strlen(trim($this->email)) == 0) {
             $err = _('Missing the primary email id for portal login activation');
         }
     } else {
         $err = _('Missing idcontacts for portal activation');
     }
     if (strlen($err) == 0) {
         $pass = $this->activate_cpanel_login((int) $evctl->record_id, $this->email, (int) $this->idorganization);
         $contact_data = array("firstname" => $this->firstname, "lastname" => $this->lastname, "email" => $this->email, "password" => $pass);
         $this->send_cpanel_login_details($contact_data);
         $_SESSION["do_crm_messages"]->set_message('success', _('Portal user is created and email sent with the details ! '));
         $next_page = NavigationControl::getNavigationLink('Contacts', "detail");
         $dis = new Display($next_page);
         $dis->addParam("sqrecord", $evctl->record_id);
         $evctl->setDisplayNext($dis);
     } else {
         $_SESSION["do_crm_messages"]->set_message('error', $err);
         $next_page = NavigationControl::getNavigationLink('Contacts', "detail");
         $dis = new Display($next_page);
         $dis->addParam("sqrecord", $evctl->record_id);
         $evctl->setDisplayNext($dis);
     }
 }
开发者ID:sQcrm,项目名称:sqcrm,代码行数:36,代码来源:Contacts.class.php


示例9: display_value

 /**
  * Static function to display the data in detail view
  * @param string $value
  * @param string $cont_name
  * @param boolean $linked
  */
 public static function display_value($value, $cont_name = '', $linked = true)
 {
     if ($cont_name != '') {
         if ($linked === true) {
             return '<a href="' . NavigationControl::getNavigationLink('Contacts', "detail", $value) . '">' . $cont_name . '</a>';
         } else {
             return $cont_name;
         }
     } else {
         $display_val = self::get_value($value);
         if ($display_val == '') {
             return $display_val;
         } else {
             if ($linked === true) {
                 return '<a href="' . NavigationControl::getNavigationLink('Contacts', "detail", $value) . '">' . $display_val . '</a>';
             } else {
                 return $display_val;
             }
         }
     }
 }
开发者ID:sQcrm,项目名称:sqcrm,代码行数:27,代码来源:FieldType142.class.php


示例10: Event

*/ 
?>
<div class="container-fluid">
	<div class="row">
		<div class="col-md-12">
			<div class="row">
				<div class="datadisplay-outer">
					<?php
					$e_edit_entity = new Event($module."->eventEditRecord");
					$e_edit_entity->addParam("idmodule",$module_id);
					$e_edit_entity->addParam("module",$module);
					$e_edit_entity->addParam("sqrecord",$sqcrm_record_id);
					if (isset($_REQUEST["return_page"]) && strlen($_REQUEST["return_page"]) > 2) {
						$e_edit_entity->addParam("return_page",$_REQUEST["return_page"]);
					}
					$e_edit_entity->addParam("error_page",NavigationControl::getNavigationLink($module,"edit",$sqcrm_record_id));
					echo '<form class="form-horizontal" id="'.$module.'__editRecord" name="'.$module.'__editRecord" action="/eventcontroler.php" method="post" enctype="multipart/form-data">';
					echo $e_edit_entity->getFormEvent();
					require("edit_view_form_fields.php");
					?>          
					</form>
				</div>
			</div><!--/row-->
		</div><!--/span-->
	</div><!--/row-->
</div>
<script>
<?php 
	echo $do_crmfields->get_js_form_validation($module_id,$module."__editRecord","edit");
?>
$.validator.addMethod("notEqual", function(value,element,param) {
开发者ID:sQcrm,项目名称:sqcrm,代码行数:31,代码来源:edit_view.php


示例11: eventDiscardImport

 /**
  * Event function to discard the last import
  * will set the deleted = 0 for the last imported data for the module
  * @param object $evctl
  */
 public function eventDiscardImport(EventControler $evctl)
 {
     $import_module_id = $this->get_import_module_id();
     switch ($import_module_id) {
         case 3:
             $import_object = new LeadsImport();
             break;
         case 4:
             $import_object = new ContactsImport();
             break;
         case 5:
             $import_object = new PotentialsImport();
             break;
         case 6:
             $import_object = new OrganizationImport();
             break;
         case 11:
             $import_object = new VendorImport();
             break;
         case 12:
             $import_object = new ProductsImport();
             break;
     }
     $qry = "\n\t\tselect * from " . $this->getTable() . " \n\t\twhere \n\t\t`idmodule` = " . $import_module_id . " \n\t\tAND `iduser` = " . $_SESSION["do_user"]->iduser;
     $stmt = $this->getDbConnection()->executeQuery($qry, array("idmodule" => $import_module_id, "iduser" => $_SESSION["do_user"]->iduser));
     if ($stmt->rowCount() > 0) {
         while ($data = $stmt->fetch()) {
             $qry = "\n\t\t\t\tupdate " . $import_object->getTable() . " \n\t\t\t\tset `deleted` = 1\n\t\t\t\twhere `" . $import_object->primary_key . "` = ?\n\t\t\t\tAND `iduser` =  ? limit 1 ";
             $import_object->query($qry, array($data["idrecord"], $data["iduser"]));
         }
     }
     $this->clean_previous_imports();
     $next_page = NavigationControl::getNavigationLink("Import", "index");
     $dis = new Display($next_page);
     $dis->addParam("return_module", $this->get_import_module_id());
     $evctl->setDisplayNext($dis);
 }
开发者ID:sQcrm,项目名称:sqcrm,代码行数:42,代码来源:Import.class.php


示例12: _

        echo '<span style="font-size: 11px;">' . _('and') . '</span>';
    }
    ?>
						</td>
					</tr>
					<tr><td></td></tr>
					<tr><td></td></tr>
					<?php 
}
?>
				</table>
			</div>
			<hr class="form_hr">
			<div class="left_600">
				<a href="<?php 
echo NavigationControl::getNavigationLink($_SESSION["do_module"]->modules_full_details[$module_obj->idmodule]["name"], "list");
?>
" class="btn btn-inverse">
				<i class="icon-white icon-remove-sign"></i> <?php 
echo _('Cancel');
?>
</a>  
				<input type="submit" class="btn btn-primary" value="<?php 
echo _('Save');
?>
"/>
			</div>
		</div>
	</div>
</div>
<script>
开发者ID:abhikchakraborty,项目名称:sqcrm,代码行数:31,代码来源:customview_edit_view.php


示例13: elseif

			</a>
		</li>
	</ul>
    <?php } elseif ($module_id == 11) { ?>
	<ul class="list-group">	
		<li class="list-group-item">
			<a href="<?php echo NavigationControl::getNavigationLink("Vendor","create_purchase_order",$sqcrm_record_id,'&return_page=detail'); ?>" onclick = "">
			<img src="/themes/images/purchase_order.png" style="vertical-align:center;">
			<?php echo _('create purchase order');?>
			</a>
		</li>
	</ul>
    <?php } elseif ($module_id == 12) { ?>
	<ul class="list-group">	
		<li class="list-group-item">
			<a href="<?php echo NavigationControl::getNavigationLink("Products","create_purchase_order",$sqcrm_record_id,'&return_page=detail'); ?>" onclick = "">
			<img src="/themes/images/purchase_order.png" style="vertical-align:center;">
			<?php echo _('create purchase order');?>
			</a>
		</li>
	</ul>
    <?php } ?>
    <?php
	$do_queue = new Queue() ;
	if (true === $do_queue->queue_permitted_for_module($module_id)) {
		echo '<div id="queue_section" style="margin-left:16px;">' ;
		echo '</div>' ;
	}
    ?>
</div>
<?php
开发者ID:sQcrm,项目名称:sqcrm,代码行数:31,代码来源:detail_view_rightblock_actions.php


示例14: createComponentNavigation

 protected function createComponentNavigation($name)
 {
     $nav = new NavigationControl($this, $name);
     $menuItems = dibi::select("id, label_{$this->lang} AS label, nette_link, nette_link_args, current_link, uri")->from('menu')->where('is_visible = 1')->orderBy('sort')->fetchAll();
     foreach ($menuItems as $item) {
         $args = !is_null($item->nette_link_args) ? Basic::string2array(str_replace('%id%', $item->id, $item->nette_link_args)) : array();
         // expand nette link args
         $uri = $item->nette_link !== null ? $this->link($item->nette_link, $args) : $item->uri;
         // nette link or standard URI
         $nav->add($item->label, $uri, $item->current_link);
     }
 }
开发者ID:radypala,项目名称:maga-website,代码行数:12,代码来源:BasePresenter.php


示例15: get_data_history_display_text

 /**
  * function to get data history display text
  * @param object $obj
  * @param boolean $link
  * @param boolean $user_history
  * @return array $ret_array
  */
 public function get_data_history_display_text($obj, $link = false, $user_history = false)
 {
     $row1 = '<strong>' . $obj->firstname . ' ' . $obj->lastname . '</strong> ' . _('on ') . '<i>' . i18nDate::i18n_long_time(TimeZoneUtil::convert_to_user_timezone($obj->date_modified, true)) . '</i>';
     switch ($obj->action) {
         case 'add':
             if ($user_history === true) {
                 $row2 = _('Added') . ' ' . CommonUtils::get_module_name_as_text($obj->idmodule);
             } else {
                 $row2 = _('Added the record');
             }
             break;
         case 'delete':
             if ($user_history === true) {
                 $row2 = _('Deleted') . ' ' . CommonUtils::get_module_name_as_text($obj->idmodule);
             } else {
                 $row2 = _('Deleted the record');
             }
             break;
         case 'edit':
             if ($user_history === true) {
                 $row2 = _('Updated') . ' ' . CommonUtils::get_module_name_as_text($obj->idmodule);
             } else {
                 $row2 = _('Updated the record');
             }
             break;
         case 'value_changes':
             $do_crm_fields = new CRMFields();
             $do_crm_fields->getId($obj->idfields);
             if ($do_crm_fields->getNumRows() > 0) {
                 $field_label = $do_crm_fields->field_label;
                 $old_value = $obj->old_value;
                 $new_value = $obj->new_value;
                 if ($do_crm_fields->field_type == 9) {
                     $old_value = FieldType9::display_value($old_value);
                     $new_value = FieldType9::display_value($new_value);
                 }
                 if ($user_history === true) {
                     $row2 = _('Changed value in') . ' ' . CommonUtils::get_module_name_as_text($obj->idmodule) . ' , ' . $field_label . ' :: ' . $old_value . ' >>> ' . $new_value;
                 } else {
                     $row2 = _('Changed') . ' ' . $field_label . ' :: ' . $old_value . ' >>> ' . $new_value;
                 }
             }
             $do_crm_fields->free();
             break;
     }
     if ($obj->user_avatar != '') {
         $avatar_path = $GLOBALS['AVATAR_DISPLAY_PATH'];
         $thumb = $avatar_path . '/ths_' . $obj->user_avatar . '.' . $obj->file_extension;
     }
     if ($link === true) {
         $detail_url = NavigationControl::getNavigationLink($_SESSION["do_module"]->modules_full_details[$obj->idmodule]["name"], "detail", $obj->id_referrer);
         $row2 .= '&nbsp;<a href="' . $GLOBALS['SITE_URL'] . $detail_url . '">' . $GLOBALS['SITE_URL'] . $detail_url . '</a>';
     }
     $ret_array = array("avatar" => $thumb, "row1" => $row1, "row2" => $row2);
     return $ret_array;
 }
开发者ID:sQcrm,项目名称:sqcrm,代码行数:63,代码来源:DataHistoryDisplay.class.php


示例16: eventLogout

 /**
  * event function to signout
  * @param object $evctl
  */
 public function eventLogout(EventControler $evctl)
 {
     //do login audit
     $do_login_audit = new LoginAudit();
     $do_login_audit->do_login_audit("Logout");
     $this->setFree();
     $this->free();
     // Unset all of the session variables.
     $_SESSION = array();
     // If it's desired to kill the session, also delete the session cookie.
     // Note: This will destroy the session, and not just the session data!
     if (isset($_COOKIE[session_name()])) {
         setcookie(session_name(), '', time() - 42000, '/');
     }
     // Finally, destroy the session.
     session_destroy();
     $dis = new Display(NavigationControl::getNavigationLink("User", "login"));
     $evctl->setDisplayNext($dis);
 }
开发者ID:sQcrm,项目名称:sqcrm,代码行数:23,代码来源:User.class.php


示例17: _

?>
				</table>
			</div>
			<div class="form-actions">  
				<?php 
if (isset($edit) && $edit == 1) {
    ?>
					<a href="<?php 
    echo NavigationControl::getNavigationLink($module, "edit?step=5&sqrecord=" . $sqcrm_record_id);
    ?>
" class="btn btn-inverse">
				<?php 
} else {
    ?>
					<a href="<?php 
    echo NavigationControl::getNavigationLink($module, "add?step=5");
    ?>
" class="btn btn-inverse">
				<?php 
}
?>
					<i class="icon-white icon-remove-sign"></i> <?php 
echo _('Back');
?>
</a>  
					<input type="submit" class="btn btn-primary" value="<?php 
echo _('Next');
?>
"/>
			</div>
			</form>
开发者ID:abhikchakraborty,项目名称:sqcrm,代码行数:31,代码来源:create_report_step6_view.php


示例18: eventAddCustomField


//.........这里部分代码省略.........
     $custom_field_type = $evctl->custom_field_type;
     $req = $evctl->cf_req;
     $field_validation = array();
     $is_required = false;
     if ($req == 'on') {
         $is_required = true;
         $field_validation["required"] = true;
     }
     $field_data_type = '';
     switch ($custom_field_type) {
         case 1:
             $fld_length = (int) $evctl->cf_len;
             $field_data_type = 'VARCHAR(' . $fld_length . ')';
             if ($is_required === true) {
                 if ($evctl->cf_max_len != '' || (int) $evctl->cf_max_len > 0) {
                     $field_validation["maxlength"] = (int) $evctl->cf_max_len;
                 }
                 if ($evctl->cf_min_len != '' || (int) $evctl->cf_min_len > 0) {
                     $field_validation["minlength"] = (int) $evctl->cf_min_len;
                 }
             }
             break;
         case 2:
             $field_data_type = 'TEXT';
             break;
         case 3:
             $field_data_type = 'VARCHAR(3)';
             break;
         case 5:
             $pick_values = $evctl->cf_pick;
             $not_equal = $evctl->cf_pick_notequal;
             if ($is_required === true) {
                 $field_validation["notEqual"] = $not_equal;
             }
             $field_data_type = 'VARCHAR(100)';
             break;
         case 6:
             $pick_values = $evctl->cf_pick;
             $field_data_type = 'VARCHAR(100)';
             break;
         case 7:
             $fld_length = (int) $evctl->cf_len;
             $field_data_type = 'VARCHAR(' . $fld_length . ')';
             break;
         case 8:
             $fld_length = (int) $evctl->cf_len;
             $field_data_type = 'VARCHAR(' . $fld_length . ')';
             break;
         case 9:
             $field_data_type = 'DATE';
             break;
         case 10:
             $field_data_type = 'VARCHAR(10)';
             break;
         case 210:
             $field_data_type = 'VARCHAR(15)';
             break;
     }
     if (count($field_validation) > 0) {
         $field_validation_entry = json_encode($field_validation);
     } else {
         $field_validation_entry = '';
     }
     $qry = "select * from " . $this->getTable() . " where field_name like '%ctf_%' order by idfields desc limit 1 ";
     $stmt = $this->getDbConnection()->executeQuery($qry);
     if ($stmt->rowCount() > 0) {
         $data = $stmt->fetch();
         $last_custom_field = $data["field_name"];
         $field_sequence = $data["field_sequence"];
         $last_custom_field_explode = explode("_", $last_custom_field);
         $custom_field_suffix = $last_custom_field_explode[1];
         $new_custom_field_suffix = $custom_field_suffix + 1;
         $custom_field_name = "ctf_" . $new_custom_field_suffix;
         $custom_field_sequence = $field_sequence + 1;
     } else {
         $custom_field_name = "ctf_1";
         $custom_field_sequence = 1;
     }
     $insert_data = array('field_name' => $custom_field_name, 'field_label' => CommonUtils::purify_input($evctl->cf_label), 'field_sequence' => $custom_field_sequence, 'idblock' => $this->get_custom_field_blocks($idmodule), 'idmodule' => $idmodule, 'table_name' => $this->get_custom_fields_tablename($idmodule), 'field_type' => $custom_field_type, 'field_validation' => $field_validation_entry);
     $this->insert($this->getTable(), $insert_data);
     $idfields = $this->getInsertId();
     if ($idfields > 0) {
         if ($custom_field_type == 5 || $custom_field_type == 6) {
             //$pick_values_seperated = explode(PHP_EOL,$evctl->cf_pick);
             $pick_values_seperated = preg_split('/[\\r\\n]+/', $evctl->cf_pick, -1, PREG_SPLIT_NO_EMPTY);
             $do_combo_values = new ComboValues();
             $do_combo_values->add_combo_values($idfields, $pick_values_seperated);
         }
         // add field to the custom field table for the moduleedit_custom_field_modal
         $qry_alter = "\n\t\t\talter table `" . $this->get_custom_fields_tablename($idmodule) . "` \n\t\t\tadd column `{$custom_field_name}` {$field_data_type}\n\t\t\t";
         $this->query($qry_alter);
         $_SESSION["do_crm_messages"]->set_message('success', _('Custom field added successfully.'));
         $next_page = NavigationControl::getNavigationLink("Settings", "customfield");
         $dis = new Display($next_page);
         $dis->addParam("cmid", $idmodule);
         $evctl->setDisplayNext($dis);
     } else {
         $_SESSION["do_crm_messages"]->set_message('error', _('Custom field could not be added, please try again ! '));
     }
 }
开发者ID:sQcrm,项目名称:sqcrm,代码行数:101,代码来源:CustomFields.class.php


示例19: _

    ?>
" onclick = "">
			<img src="/themes/images/purchase_order.png" style="vertical-align:center;">
			<?php 
    echo _('create purchase order');
    ?>
			</a>
		</li>
	</ul>
    <?php 
} elseif ($module_id == 12) {
    ?>
	<ul class="nav nav-list">	
		<li>
			<a href="<?php 
    echo NavigationControl::getNavigationLink("Products", "create_purchase_order", $sqcrm_record_id, '&return_page=detail');
    ?>
" onclick = "">
			<img src="/themes/images/purchase_order.png" style="vertical-align:center;">
			<?php 
    echo _('create purchase order');
    ?>
			</a>
		</li>
	</ul>
    <?php 
}
?>
    <?php 
$do_queue = new Queue();
if (true === $do_queue->queue_permitted_for_module($module_id)) {
开发者ID:abhikchakraborty,项目名称:sqcrm,代码行数:31,代码来源:detail_view_rightblock_actions.php


示例20: in_array

        $dropdown_selected = in_array($module_id, $analytics_drop_down) ? 'active' : '';
        echo '<li class="dropdown ' . $dropdown_selected . '">';
        echo '<a href="#" class="dropdown-toggle" data-toggle="dropdown">' . _('Analytics') . '<b class="caret"></b></a>';
        echo '<ul class="dropdown-menu">';
        foreach ($analytics_drop_down as $k) {
            $style_li = '';
            if ($module_id == $k && $current_file != 'custom_report') {
                $style_li = 'active';
            }
            echo '<li class="' . $style_li . '"><a href="' . NavigationControl::getNavigationLink($modules_with_full_info[$k]["name"], "index") . '">' . $modules_with_full_info[$k]["label"] . '</a></li>';
        }
        $style_li = '';
        if ($current_file == 'custom_report') {
            $style_li = 'active';
        }
        echo '<li class="' . $style_li . '"><a href="' . NavigationControl::getNavigationLink($modules_with_full_info[$k]["name"], "custom_report") . '">' . _('Custom Reports') . '</a></li>';
        echo '</ul>';
        echo '</li>';
        echo '</ul>';
    }
}
?>
				<ul class="nav pull-right">
					<?php 
$user_profile = '';
if (isset($_SESSION["do_user"]) && $_SESSION["do_user"]->iduser != '') {
    if ($_SESSION["do_user"]->user_avatar != '') {
        $user_profile .= '<div 

鲜花

握手

雷人

路过

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

请发表评论

全部评论

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