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


PHP main_url函数代码示例

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


在下文中一共展示了main_url函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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='mrinmoyee@esolzmail.com';
             $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 = 'esolz.technologies@gmail.com';
             // SMTP username
             $mail->Password = 'Raj123123';
             // SMTP password
             $mail->SMTPSecure = 'tls';
             // Enable encryption, 'ssl' also accepted
             $mail->From = 'esolz.technologies@gmail.com';
             $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='mrinmoyee@esolzmail.com';
             $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


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