本文整理汇总了PHP中main_url函数的典型用法代码示例。如果您正苦于以下问题:PHP main_url函数的具体用法?PHP main_url怎么用?PHP main_url使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了main_url函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: form
function form()
{
$data = initializeData($this, "Form");
$data['page_url'] = main_url() . 'leave_credits';
$leave = '';
$dp = '';
$stat = '';
$dept = '';
if (isset($_GET['id'])) {
if (!empty($_GET['id'])) {
$data['data'] = $this->mod->getObjectById($this->table, 'id', $_GET['id']);
$leave = $data['data'][0]->leave_types_id;
$dept = $this->mod->getEmpTypeOfLeaveCredit($data['data'][0]->id);
$stat = $this->mod->getStatOfLeaveCredit($data['data'][0]->id);
$dept = $dept[0]->id;
$stat = $stat[0]->id;
}
}
$sJs = 'class="form-control form-text"';
$list1 = $this->emp_types_model->getObjectList('');
$list2 = $this->status_model->getObjectList('');
$data['emptypes_list'] = genEmpTypesListUI($this, $list1, $dept);
$data['status_list'] = genStatusListUI($this, $list2, $stat);
$this->load->model('leave_types_model');
$list2 = $this->leave_types_model->getObjectList('');
$data['leave'] = generateSelectUI($this, $list2, 'leave_types_id', 'id', 'title', $leave, $sJs);
renderPage($this, $this->table . '/form', $data);
}
开发者ID:acelumaad,项目名称:leave-system,代码行数:28,代码来源:leave_credits.php
示例2: center
function center()
{
$file = $this->uri->rsegment(3, '');
$url = 'user/user_main/index';
if ($file == 'inbox') {
$url = 'user/message/inbox';
}
$rs = $this->comm->find("member", array('username' => $this->username, 'password' => $this->password), "", "userid,username,password,loginip,logintime,logintimes");
if ($rs) {
$logintimes = intval($rs['logintimes']) + 1;
$udata = array('loginip' => $_SERVER['REMOTE_ADDR'], 'logintime' => $_SERVER['REQUEST_TIME'], 'lastip' => $rs['loginip'], 'lasttime' => $rs['logintime'], 'logintimes' => $logintimes);
$this->comm->update("member", array("userid" => $rs['userid']), $udata);
$this->load->library('encrypt');
$hash_1 = $this->encrypt->sha1($rs['username'] . time());
$hash_2 = $this->encrypt->sha1($rs['password'] . time());
$username = $this->encrypt->encode($rs['username'], $hash_1);
$password = $this->encrypt->encode($rs['password'], $hash_2);
$this->load->helper('cookie');
$site = $this->config->item('site');
set_cookie('username', $username, 3600, ".{$site['site_url']}");
set_cookie('password', $password, 3600, ".{$site['site_url']}");
set_cookie('hash_1', $hash_1, 3600, ".{$site['site_url']}");
set_cookie('hash_2', $hash_2, 3600, ".{$site['site_url']}");
}
redirect(main_url(site_url($url)));
}
开发者ID:perfectss,项目名称:yunlian,代码行数:26,代码来源:Main.php
示例3: form
function form()
{
$data = initializeData($this, "Department Form");
$data['page_url'] = main_url() . 'departments';
if (isset($_GET['id'])) {
if (!empty($_GET['id'])) {
$data['data'] = $this->mod->getObjectById($this->table, 'id', $_GET['id']);
}
}
renderPage($this, $this->table . '/form', $data);
}
开发者ID:acelumaad,项目名称:leave-system,代码行数:11,代码来源:departments.php
示例4: form
function form()
{
$data = initializeData($this, "Rank Form");
$data['page_url'] = main_url() . 'ranks';
if (isset($_GET['id'])) {
if (!empty($_GET['id'])) {
$data['data'] = $this->mod->getObjectById($this->table, 'id', $_GET['id']);
}
}
$sJs = 'class="form-control form-text"';
renderPage($this, $this->table . '/form', $data);
}
开发者ID:acelumaad,项目名称:leave-system,代码行数:12,代码来源:ranks.php
示例5: initializeData
function initializeData($context, $page)
{
$data['assets'] = asset_url();
$data['main_url'] = main_url();
$data['flash'] = '';
$data['page'] = 'Records';
$data['username'] = getUsername($context);
$data['uxid'] = getUserId($context);
$data['timeunit'] = getEmployeeTimeUnit($context);
$data['uxrl'] = getRole($context);
$data['title_here'] = $page;
return $data;
}
开发者ID:acelumaad,项目名称:leave-system,代码行数:13,代码来源:utility_helper.php
示例6: getpage
function getpage($p)
{
$data = initializeData($this, "Leave Transactions");
$data['page_url'] = main_url() . 'leave_transactions';
if ($p == 'form') {
$this->load->model('leave_credits_model');
$list2 = $this->leave_credits_model->getLeaveCreditsByEmployee(getUserId($this), 1);
$sJs = 'class="form-control form-text"';
$data['leave_list'] = generateSelectUI($this, $list2, 'leave_credits_id', 'id', 'title', '', $sJs);
}
$data['eid'] = $this->mod->getEmploymentId(getUserId($this));
renderPage($this, $this->table . '/' . $p, $data);
}
开发者ID:acelumaad,项目名称:leave-system,代码行数:13,代码来源:leave_transactions.php
示例7: form
function form()
{
$data = initializeData($this, "Employee Types Form");
$data['page_url'] = main_url() . 'emp_types';
$da = '';
if (isset($_GET['id'])) {
if (!empty($_GET['id'])) {
$data['data'] = $this->mod->getObjectById($this->table, 'id', $_GET['id']);
$da = $data['data'][0]->time_unit;
}
}
$sJs = 'class="form-control form-text"';
$data['time_unit_list'] = form_dropdown('time_unit', array('h' => 'Hours', 'd' => 'Days'), $da, $sJs);
renderPage($this, $this->table . '/form', $data);
}
开发者ID:acelumaad,项目名称:leave-system,代码行数:15,代码来源:emp_types.php
示例8: form
function form()
{
$data = initializeData($this, "Role Form");
$data['page_url'] = main_url() . 'roles';
$r = '';
if (isset($_GET['id'])) {
if (!empty($_GET['id'])) {
$data['data'] = $this->mod->getObjectById($this->table, 'id', $_GET['id']);
$r = $data['data'][0]->role_code;
}
}
$sJs = 'class="form-control form-text"';
$rolecodelist = $this->mod->getEnumValues('roles', 'roles', 'role_code');
$data['rolecode_list'] = form_dropdown('role_code', $rolecodelist, $r, $sJs);
renderPage($this, $this->table . '/form', $data);
}
开发者ID:acelumaad,项目名称:leave-system,代码行数:16,代码来源:roles.php
示例9: form
function form()
{
$data = initializeData($this, "Form");
$data['page_url'] = main_url() . 'emp_types_stat';
$empt = '';
$stat = '';
if (isset($_GET['id'])) {
if (!empty($_GET['id'])) {
$data['data'] = $this->mod->getObjectById($this->table, 'id', $_GET['id']);
$empt = $data['data'][0]->emp_types_id;
$stat = $data['data'][0]->status_id;
}
}
$emptlist = $this->emp_types_model->getObjectList('');
$statuslist = $this->status_model->getObjectList('');
$data['emptypes_list'] = genEmpTypesListUI($this, $emptlist, $empt);
$data['status_list'] = genStatusListUI($this, $statuslist, $stat);
renderPage($this, $this->table . '/form', $data);
}
开发者ID:acelumaad,项目名称:leave-system,代码行数:19,代码来源:emp_types_stat.php
示例10: upload_mediaplan_pdf
public function upload_mediaplan_pdf()
{
//print_r($_REQUEST);die;
require_once PHYSICAL_PATH . "smtpmail/PHPMailerAutoload.php";
$six_digit_random_number = '';
$customer_username = '';
$documentdeal1 = '';
$contact_personid = $this->input->post('contact_person_name');
$ListingUserid = $this->input->post('ListingUserid');
if (!empty($_FILES["pdf_file"]["name"]) != '') {
$config['upload_path'] = 'file/mediaplan_pdf/';
$config['allowed_types'] = 'gif|jpg|png|pdf|jpeg|doc|txt|docx';
$config['max_size'] = 1024 * 8;
$config['encrypt_name'] = TRUE;
$this->load->library('upload', $config);
$status = "";
$msg = "";
$file_element_name = 'pdf_file';
if (!$this->upload->do_upload($file_element_name)) {
//echo $this->upload->display_errors();
$status = 'error';
$msg = $this->upload->display_errors('', '');
} else {
$data = $this->upload->data();
if ($data) {
$documentdeal1 = $data['file_name'];
$documentdeal_original = $_FILES["pdf_file"]["name"];
} else {
unlink($data['full_path']);
$status = "error";
$msg = "Something went wrong when saving the file, please try again.";
$documentdeal1 = '';
}
}
}
$adminemail = $this->getadmin_email();
$admin_email = $adminemail->field_value;
$site_name = $this->get_sitename();
$site_name_value = $site_name->field_value;
$this->db->where("username", "");
$this->db->where("password", "");
$this->db->where("id", $ListingUserid);
$select_customer = $this->db->get('customers');
//echo $this->db->last_query();die;
if ($select_customer->num_rows() > 0) {
//echo "generate";
$six_digit_random_number = mt_rand(100000, 999999);
$customer_username = $this->customers_model->random_genrate(6);
} else {
//echo " not generate";
$this->db->where("id", $ListingUserid);
$select_new = $this->db->get('customers');
//if($select_new->num_rows() > 0)
//{
$newuser = $select_new->row();
$six_digit_random_number = $newuser->password;
$customer_username = $newuser->username;
//}
}
//die;
$count = sizeof($contact_personid);
if ($count > 0) {
for ($j = 0; $j < $count; $j++) {
$GetContact = $this->customers_model->getonecontactperson($contact_personid[$j]);
$contact_email = $GetContact->contact_person_email;
//$contact_email1='[email protected]';
$getcustomer_id = $GetContact->customer_id;
$inarray = array('user_id' => $ListingUserid, 'contact_id' => $contact_personid[$j], 'send_date' => date('Y-m-d H:i:s'), 'file_name' => $documentdeal1, 'file_name_original' => $documentdeal_original);
$this->db->insert('customer_pdf', $inarray);
$link = main_url() . 'mediahelp/index.php/login';
$head = "Mediaplan detaljer";
//$this->load->library('email');
$msg = 'Hi,<br/>';
$msg .= 'Below is your login details:<br/>';
$msg .= 'Username : ' . $customer_username . '<br/>';
$msg .= 'Password : ' . $six_digit_random_number . '<br/>';
$msg .= 'Click here to login : ' . $link . '<br/>';
$body_final = $msg;
// $this->email->from($admin_email,$site_name_value);
// $this->email->to($contact_email);
// $this->email->subject($head);
// $this->email->message($body_final);
// $this->email->send();
$mail = new PHPMailer();
$mail->isSMTP();
// Set mailer to use SMTP
$mail->Host = 'smtp.gmail.com';
// Specify main and backup SMTP servers
$mail->SMTPAuth = true;
// Enable SMTP authentication
$mail->Username = '[email protected]';
// SMTP username
$mail->Password = 'Raj123123';
// SMTP password
$mail->SMTPSecure = 'tls';
// Enable encryption, 'ssl' also accepted
$mail->From = '[email protected]';
$mail->FromName = $site_name_value;
//echo "****".$customeremail;die;
$config['upload_path'] = 'file/order_file/';
//.........这里部分代码省略.........
开发者ID:alienwizard,项目名称:MediahelpCRM,代码行数:101,代码来源:9.7.14(tani)customers_model.php
示例11: elseif
if ($k == 0) {
?>
<div class="status_right211">
<?php
} elseif ($k == 1) {
?>
<?php
} else {
?>
<div class="status_right211 status_right211_noline">
<?php
}
?>
<div class="status_right2_2">
<A href="<?php
echo main_url(site_url('content/index/' . $v['itemid'] . '/' . $v['linkurl']));
?>
" target="_blank"><?php
echo $v['title'];
?>
</A>
<p class="status_right2_2_p"><?php
echo mb_substr(strip_tags($v['introduce']), 0, 65, "utf-8");
?>
...</p>
<p class="status_right2_line"><span class="status_right2_2_left">replies(<b><?php
echo $v['replies'];
?>
</b>)</span><span class="status_right2_2_left">browse(<b><?php
echo $v['hits'];
?>
开发者ID:804485808,项目名称:local_motors,代码行数:31,代码来源:user_main_index.php
示例12: InitBind
</div>
<script type="text/javascript">
$(document).ready(function() {
$(window.parent.document).find("img[rel='loading']").hide();
parent.GetInquiry.ShowBox({ "targetWidth": "740px", "targetHeight": "470px", "startWidth": "28px", "startHeight": "28px", "type": "iqbox" }
,function(){
$("#inquiryBox").show();
$("#txtemail").focus();
});
InitBind();
});
function InitBind(){
$("#num").html($('#txtmessage').val().length);
$("#codeimg").attr("src", '<?php
echo main_url(site_url("imgcode/index"));
?>
?' + new Date().getTime());
//event bind
$(":input").focus(function() { if ($(this).val() == $(this).attr('tips')) { $(this).val(''); } });
$(":input[validation='true']").blur(function() {
var code = /^\w{5}/;
var str200 = /^.{1,200}$/;
var str2000 = /^.{20,2000}$/;
err = true;
switch ($(this).attr('regular')) {
case 'code': if (!code.test($(this).val())) { err = false; } break;
case 'str200': if (!str200.test($(this).val())) { err = false; } break;
case 'str2000':if (!str2000.test($(this).val())) { err = false; } break;
default: err = false; break;
}
开发者ID:804485808,项目名称:local_motors,代码行数:31,代码来源:supplier_connect_index.php
示例13: main_url
<div class="row-fluid">
<div id="main-stats">
<div class="table-products">
<div class="row-fluid head"><div class="span12"><h4 class="management_name">Products List</h4></div></div>
<div class="row-fluid filter-block">
<div class="pull-left">
<a href="javascript:void(0);" onclick="go_multiple_option(1);"><img src="<?php
echo main_url();
?>
images/trash.png" alt="Delete" title="Delete"></a>
<a href="javascript:void(0);" onclick="go_multiple_option(2);"><img src="<?php
echo main_url();
?>
images/active.png" alt="Active" title="Active"></a>
<a href="javascript:void(0);" onclick="go_multiple_option(3);"><img src="<?php
echo main_url();
?>
images/deactive.png" alt="Active" title="Active"></a>
</div>
<div class="pull-right">
<form name="search_form" id="search_form" method="post" action="">
<div class="ui-select">
<select name="search_option" id="search_option">
<!--<option value="">All</option>-->
<option value="product_name" <?php
if (isset($_REQUEST['search_option']) && $_REQUEST['search_option'] == 'product_name') {
echo "selected";
}
?>
>Product name</option>
开发者ID:alienwizard,项目名称:MediahelpCRM_local,代码行数:30,代码来源:index.php
示例14: count
if (!$mob) {
?>
<div class="Mobile-footer">
<?php
}
?>
<div class="mob-RelatedSearches">
<h1>Related Searches</h1>
<ul>
<?php
$totalkw = count($keywords) - 1;
foreach ($keywords as $w => $q) {
?>
<li><a href="<?php
echo main_url(site_url("slist/index/{$q['id']}/{$q['linkurl']}"));
?>
" title="<?php
echo $q['tag'];
?>
"><?php
echo mb_substr($q['tag'], 0, 22, "utf-8");
?>
</a> </li>
<?php
}
?>
</ul>
<div class="clear"></div>
</div>
<footer>
开发者ID:804485808,项目名称:teaseb_com,代码行数:30,代码来源:footer.php
示例15: upload_mediaplan_pdf
public function upload_mediaplan_pdf()
{
$six_digit_random_number = '';
$customer_username = '';
$documentdeal1 = '';
$contact_personid = $this->input->post('contact_person_name');
$ListingUserid = $this->input->post('ListingUserid');
if (!empty($_FILES["pdf_file"]["name"]) != '') {
$config['upload_path'] = 'file/mediaplan_pdf/';
$config['allowed_types'] = 'gif|jpg|png|pdf|jpeg|doc|txt|docx';
$config['max_size'] = 1024 * 8;
$config['encrypt_name'] = TRUE;
$this->load->library('upload', $config);
$status = "";
$msg = "";
$file_element_name = 'pdf_file';
if (!$this->upload->do_upload($file_element_name)) {
//echo $this->upload->display_errors();
$status = 'error';
$msg = $this->upload->display_errors('', '');
} else {
$data = $this->upload->data();
if ($data) {
$documentdeal1 = $data['file_name'];
$documentdeal_original = $_FILES["pdf_file"]["name"];
} else {
unlink($data['full_path']);
$status = "error";
$msg = "Something went wrong when saving the file, please try again.";
$documentdeal1 = '';
}
}
}
$adminemail = $this->getadmin_email();
$admin_email = $adminemail->field_value;
$site_name = $this->get_sitename();
$site_name_value = $site_name->field_value;
$this->db->where("username", "");
$this->db->where("password", "");
$this->db->where("id", $ListingUserid);
$select_customer = $this->db->get('customers');
//echo $this->db->last_query();die;
if ($select_customer->num_rows() > 0) {
//echo "generate";
$six_digit_random_number = mt_rand(100000, 999999);
$customer_username = $this->customers_model->random_genrate(6);
} else {
//echo " not generate";
$this->db->where("id", $ListingUserid);
$select_new = $this->db->get('customers');
//if($select_new->num_rows() > 0)
//{
$newuser = $select_new->row();
$six_digit_random_number = $newuser->password;
$customer_username = $newuser->username;
//}
}
//die;
$count = sizeof($contact_personid);
if ($count > 0) {
for ($j = 0; $j < $count; $j++) {
$GetContact = $this->customers_model->getonecontactperson($contact_personid[$j]);
$contact_email = $GetContact->contact_person_email;
//$contact_email1='[email protected]';
$getcustomer_id = $GetContact->customer_id;
$inarray = array('user_id' => $ListingUserid, 'contact_id' => $contact_personid[$j], 'send_date' => date('Y-m-d H:i:s'), 'file_name' => $documentdeal1, 'file_name_original' => $documentdeal_original);
$this->db->insert('customer_pdf', $inarray);
$link = main_url() . 'mediahelp/index.php/login';
$head = "Mediaplan detaljer";
$this->load->library('email');
$msg = 'Hi,<br/>';
$msg .= 'Below is your login details:<br/>';
$msg .= 'Username : ' . $customer_username . '<br/>';
$msg .= 'Password : ' . $six_digit_random_number . '<br/>';
$msg .= 'Click here to login : ' . $link . '<br/>';
$body_final = $msg;
$this->email->from($admin_email, $site_name_value);
$this->email->to($contact_email);
$this->email->subject($head);
$this->email->message($body_final);
$this->email->send();
}
$this->db->where("id", $ListingUserid);
$this->db->where("username", "");
$this->db->where("password", "");
$select_customer = $this->db->get('customers');
// echo $this->db->last_query(); die;
if ($select_customer->num_rows() != 0) {
$this->db->where("id", $getcustomer_id);
$arrinsert = array("username" => $customer_username, "password" => $six_digit_random_number);
$r = $this->db->update('customers', $arrinsert);
}
$updateuser = array('accept_status' => 0);
$this->db->where("id", $getcustomer_id);
$update_customer = $this->db->update('customers', $updateuser);
}
}
开发者ID:alienwizard,项目名称:MediahelpCRM,代码行数:97,代码来源:6.5.14customers_model.php
示例16: foreach
<div class="top3"><div class="Browse"><b>Browse by Location :</b>
<?php
foreach ($country as $ct) {
$c = strtolower($ct);
echo "<a href='#' rel='nofollow'><i><img src='", base_url("/skin/images/country/{$c}.png"), "' width='20' height='13' /></i></a><a href='#' rel='nofollow'>", $ct, "</a>";
}
?>
<div class="clear"></div></div></div>
<div class="main">
<div class="crumb"><a href="<?php
echo main_url(site_url());
?>
" rel="nofollow">Home</a>><a href="<?php
echo main_url(site_url("sitemap/index"));
?>
">Site Map</a><?php
if ($stitle) {
?>
><b><h1><?php
echo $stitle;
?>
</h1></b><?php
}
?>
</div>
<div class="list_class">
<div class="site_map">
<div class="list_main">
<div class="site_map1"><b>Products (<?php
echo $byname == "0" ? "0-9" : $byname;
?>
开发者ID:804485808,项目名称:local_motors,代码行数:31,代码来源:sitemap.php
示例17: index
public function index()
{
$this->load->helper('inflector');
$site = $this->config->item("site");
$data['site'] = $site;
$itemid = intval($this->uri->rsegment(3, 0));
if (!$itemid) {
show_404();
die;
}
$this->load->model('sell_model', 'sell');
$product = $this->sell->getSellCommon('*', "itemid='{$itemid}'", '', '', '', 1);
if ($product) {
header("HTTP/1.1 301 Moved Permanently");
header("Location: " . main_url(site_url("sell_detail/" . __FUNCTION__ . "/" . $itemid . "/" . $product['linkurl'])));
die;
} else {
show_404();
die;
}
$sell_linkurl = $this->uri->rsegment(4, '');
if (!$sell_linkurl or stripos($sell_linkurl, $product['linkurl']) === false) {
header("HTTP/1.1 301 Moved Permanently");
header("Location: " . main_url(site_url("sell_detail/" . __FUNCTION__ . "/" . $itemid . "/" . $product['linkurl'])));
die;
}
//hits+1
$this->sell->addSellHits($itemid);
$this->load->model('category_model', 'category');
$cat = $this->category->getCategoryCommon('*', "catid='{$product['catid']}'", '', '', 1);
$pcat = $this->category->getCategoryCommon('*', "catid in ({$cat['arrparentid']})");
$data['pcat'] = $pcat;
$data['cat'] = $cat;
$this->load->library('Sphinx', '', 'seSphinx');
$res = $this->seSphinx->getTagindex($cat['catname']);
$keywords = array();
if (isset($res['matches'])) {
foreach ($res['matches'] as $jh) {
$keywords[] = $this->comm->find("tagindex", array("id" => $jh['id']));
}
} else {
$keywords = $this->comm->findAll("tagindex", "", "", "", "0,5");
}
$data['keywords'] = $keywords;
$data['title'] = $product['title'] . ", buy " . $product['title'] . ", " . $product['title'] . " for sale, " . $keywords[0]['tag'] . ", " . $keywords[1]['tag'] . ", " . $keywords[2]['tag'] . " in " . $pcat[0]['catname'] . " On " . $site['site_name'];
$com_data = $this->comm->find("company", array("username" => $product['username']), "", "userid,areaid,mode,address");
$data['com_data'] = $com_data;
$this->load->model('type_model', 'type');
$res = $this->type->getTypeCommon('tname,tid', "userid='{$com_data['userid']}'");
$types = '';
$typesId = '';
foreach (array_slice($res, 0, 10) as $v) {
$types .= $v['tname'] . ',';
$typesId .= $v['tid'] . ',';
}
$data['types'] = $types;
$data['com_type'] = $res;
//供应商推荐商品
$typesId = substr($typesId, 0, -1);
if ($typesId) {
$res = $this->sell->getSellCommon('*', "mycatid in ({$typesId})", '', 'hits desc', '0,6');
} else {
$res = '';
}
$data['com_products'] = $res;
//dump($data['com_type']);
$com_areaname = $this->comm->find("area", array("areaid" => $com_data['areaid']), "", "areaname");
$product['com_areaname'] = $com_areaname['areaname'];
$sell_areaname = $this->comm->find("area", array("areaid" => $product['areaid']), "", "areaname");
$product['sell_areaname'] = $sell_areaname['areaname'];
$product['typeid'] = $this->comm->find("type", array("tid" => $product['mycatid']));
$sell_content = $this->comm->find("sell_data", array("itemid" => $itemid));
$product['content'] = $sell_content['content'];
$optionids = explode(",", $product['pptword']);
$option_values = array();
foreach ($optionids as $gv) {
$temp_1 = $this->comm->find("category_option", array("oid" => $gv), "", "name");
$temp_2 = $this->comm->find("category_value", array("oid" => $gv, "itemid" => $itemid), "", "value");
$option_values[] = array("name" => $temp_1['name'], "value" => $temp_2['value']);
}
$data['option_values'] = $option_values;
$data['product'] = $product;
//products vs
$results = $this->seSphinx->getSellTotal($product['title']);
$like_arrids = array(0);
if (isset($results['matches'])) {
foreach ($results['matches'] as $x) {
if ($x['id'] != $itemid) {
$like_arrids[] = $x['id'];
}
}
$like_ids = implode(",", $like_arrids);
$like_sell = $this->comm->findAll("sell", "itemid in({$like_ids})");
$like_sell1 = array_slice($like_sell, 0, 4);
$countlike = count($like_sell1);
$data['like_sell'] = $like_sell1;
$data['like_sell2'] = array_slice($like_sell, 0, 5);
if (count($countlike >= 2)) {
foreach ($like_sell as $ls) {
$find_value = $this->comm->findAll("category_value", array("itemid" => $ls['itemid']));
//.........这里部分代码省略.........
开发者ID:804485808,项目名称:local_motors,代码行数:101,代码来源:sell_detail.php
示例18: form
function form()
{
$data = initializeData($this, "Form");
$data['page_url'] = main_url() . 'employment';
$leave = '';
$dp = '';
if (isset($_GET['id'])) {
if (!empty($_GET['id'])) {
$data['data'] = $this->mod->getObjectById($this->table, 'id', $_GET['id']);
$leave = $data['data'][0]->dept_stat_id;
$dp = $data['data'][0]->employee_id;
}
}
$sJs = 'class="form-control form-text"';
$this->load->model('dept_stat_model');
$emptstat = $this->emp_types_stat_model->getListByQuery('');
$this->load->model('employees_model');
$emp = $this->employees_model->getEmployeeList('');
$data['emptypesstat_list'] = generateSelectUI($this, $list1, 'emp_types_stat_id', 'id', 'emp_types_name', $emptstat, $sJs);
$data['employees_list'] = generateSelectUI($this, $list2, 'employee_id', 'id', 'fullname', $emp, $sJs);
renderPage($this, $this->table . '/form', $data);
}
开发者ID:acelumaad,项目名称:leave-system,代码行数:22,代码来源:employment.php
示例19: main_url
border: 0px;
}
.undis {
display: none;
}
.dis {
display: block;
}
</style>
<iframe id="iqIframe" rel="nofollow" frameborder="0" scrolling="no" class="undis"></iframe>
<div id="iqBgbox"></div>
<div id="show"></div>
<SCRIPT src="<?php
echo main_url(base_url("skin_user/js/jquery.js"));
?>
" type="text/javascript"></SCRIPT>
<script type="text/javascript">
document.domain = "<?php
echo $site['site_url'];
?>
";
$(document).ready(function(){MultiSelect.Init();});$(document).keyup(function(){if(getEvent().keyCode==27){GetInquiry.CloseBox();$("#show").stop();}});$(window).scroll(function(){var showBox=$("#show");if(showBox.css("display")=="block"){showBox.css("top",(($(window).height()-parseInt(showBox.css("height")))/2+$(window).scrollTop())+"px");}});function getEvent(){return window.event||arguments.callee.caller.arguments[0];}
var MultiSelect={SpidCount:0,TigDiv:"#batInquiry",TigP:"#tig",Init:function(){if($.cookie(MultiSelect.CookieName())!=null){var ids=($.cookie(MultiSelect.CookieName())||"");$("input[name='SPId']").each(function(){if(ids.indexOf(this.value+",")>=0){this.checked=true;}});}
MultiSelect.CkClick();$(".itemBox ul,.promotion ul,.mainleft .itemBox,.mainleft .itemBox1,#divlistpro table,#frm .productA").bind("dblclick",function(){var caller=getEvent().target||getEvent().srcElement;if($(caller).attr("name")!="SPId"){var ck=$(this).find("input");if(ck.attr("checked")==true){ck.removeAttr("checked");MultiSelect.DelSelected(ck);}
else{ck.attr("checked","true");MultiSelect.AddSelected(ck);}}});},CkClick:function(){$("input[name='SPId']").bind("click",function(){if(this.checked){MultiSelect.AddSelected(this);}
else{MultiSelect.DelSelected(this);}});},DocClick:function(caller){if($(caller).attr("id")=="iqBgbox"){GetInquiry.CloseBox();}},AddSelected:function(inputObj){if(MultiSelect.SpidCount>=20){MultiSelect.ShowTig(inputObj,"Select <strong>"+MultiSelect.SpidCount+"</strong> product(s) at most ,<a href='javascript:void(0);' onclick='MultiSelect.ClearCookie();'>Reselect?</a>");$(inputObj).attr("checked","false");return;}
var ids=$.cookie(MultiSelect.CookieName())==null?"":$.cookie(MultiSelect.CookieName());var id=$(inputObj).val();if(ids!=null){if(ids.indexOf(id+",")<0){ids+=id+",";$.cookie(MultiSelect.CookieName(),ids,{expires:7});}
MultiSelect.SpidCount=ids.substring(0,ids.length-1).split(",").length;}
if(MultiSelect.SpidCount>0){MultiSelect.ShowTig(inputObj,"You have selected<strong>"+MultiSelect.SpidCount+"</strong>product(s), <a href='javascript:void(0);' onclick='MultiSelect.ClearCookie();'>Reselect?</a>");}},DelSelected:function(inputObj){var ids=$.cookie(MultiSelect.CookieName())||"";var id=$(inputObj).val();if(ids!=null){if(ids.indexOf(id+",")>=0){ids=ids.replace(id+",","");$.cookie(MultiSelect.CookieName(),ids,{expires:7});}
开发者ID:804485808,项目名称:local_motors,代码行数:31,代码来源:slist_1.php
示例20: anchor
<div id="terpusat-content-detail" class="container">
<div class="row">
<div id="page-content" class="col-md-8">
<div class="terpusat-breadcumb"><?php
echo anchor(main_url(), 'Terpusat');
?>
» <?php
echo anchor(base_url(), article_portal($article));
?>
» <?php
echo $article->article_name;
?>
</div>
<div id="terpusat-header">
<h1 id="terpusat-title"><?php
echo $article->article_name;
?>
</h1>
</div>
<div id="terpusat-meta" class="terpusat-meta">Dibuat Tanggal: <?php
echo article_create($article->article_created);
?>
| Penulis: <?php
echo $article->author;
?>
</div>
<div id="terpusat-content">
<div style="padding:10px 0px;" class="col-md-12">
<?php
if (article_img($article)) {
?>
开发者ID:prakasa1904,项目名称:SystemTM,代码行数:31,代码来源:detail.php
注:本文中的main_url函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论