コード例 #1
0
 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);
 }
コード例 #2
0
ファイル: Main.php プロジェクト: perfectss/yunlian
 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)));
 }
コード例 #3
0
 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);
 }
コード例 #4
0
ファイル: ranks.php プロジェクト: acelumaad/leave-system
 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);
 }
コード例 #5
0
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;
}
コード例 #6
0
 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);
 }
コード例 #7
0
ファイル: emp_types.php プロジェクト: acelumaad/leave-system
 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);
 }
コード例 #8
0
ファイル: roles.php プロジェクト: acelumaad/leave-system
 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);
 }
コード例 #9
0
 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);
 }
コード例 #10
0
 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='*****@*****.**';
             $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 : '******'<br/>';
             $msg .= 'Password : '******'<br/>';
             $msg .= 'Click here to login : '******'<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 = '******';
             // SMTP username
             $mail->Password = '******';
             // SMTP password
             $mail->SMTPSecure = 'tls';
             // Enable encryption, 'ssl' also accepted
             $mail->From = '*****@*****.**';
             $mail->FromName = $site_name_value;
             //echo "****".$customeremail;die;
             $config['upload_path'] = 'file/order_file/';
             //$mail->WordWrap = 50;                                 // Set word wrap to 50 characters
             //$mail->addAttachment($config['upload_path'].$documentdeal);
             $mail->addAddress($contact_email);
             // Add a recipient
             $mail->isHTML(true);
             $mail->Subject = $head;
             $mail->Body = $body_final;
             $mail->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);
     }
 }
コード例 #11
0
        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'];
        ?>
コード例 #12
0
  </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;
              }
コード例 #13
0
	<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>
									
コード例 #14
0
ファイル: footer.php プロジェクト: 804485808/teaseb_com
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>
コード例 #15
0
 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='*****@*****.**';
             $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 : '******'<br/>';
             $msg .= 'Password : '******'<br/>';
             $msg .= 'Click here to login : '******'<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);
     }
 }
コード例 #16
0
ファイル: sitemap.php プロジェクト: 804485808/local_motors
<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;
?>
コード例 #17
0
 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']));
                 if ($ls['maxprice'] != 0.0) {
                     $op_value['Price'][$ls['itemid']] = "USD " . $ls['minprice'] . "-" . $ls['maxprice'];
                 } else {
                     $op_value['Price'][$ls['itemid']] = "Factory Price";
                 }
                 if (!empty($ls['minamount'])) {
                     $op_value['Min Order'][$ls['itemid']] = $ls['minamount'];
                 }
                 foreach ($find_value as $fv) {
                     $option = $this->comm->find("category_option", array("oid" => $fv['oid']));
                     $op_value[$option['name']][$ls['itemid']] = $fv['value'];
                 }
             }
             $i = 0;
             foreach ($op_value as $op => $value) {
                 $count_value = count($value);
                 if ($count_value >= 2 && $i < 10) {
                     $sort_op_value[$count_value . $op] = $value;
                     $i++;
                 }
             }
             krsort($sort_op_value);
         } else {
             $sort_op_value = array();
         }
     } else {
         $sort_op_value = array();
     }
     $data['sort_op_value'] = $sort_op_value;
     $this->load->view('header', $data);
     $this->load->view('sell_detail');
     $this->load->view('footer');
 }
コード例 #18
0
ファイル: employment.php プロジェクト: acelumaad/leave-system
 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);
 }
コード例 #19
0
ファイル: slist_1.php プロジェクト: 804485808/local_motors
	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});}
コード例 #20
0
ファイル: detail.php プロジェクト: prakasa1904/SystemTM
	<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');
?>
 &raquo; <?php 
echo anchor(base_url(), article_portal($article));
?>
 &raquo; <?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)) {
    ?>
コード例 #21
0
</a></p>
	  	<p><?php 
echo $inquiry['inquiry_data']['message'];
?>
</p>
	  	<p><textarea name="content" id="content" cols="30" rows="10"></textarea></p>
	  	<p><input type="button" value="reply" class="reply_button" onclick="check_reply()"/>
	  	<input type="button" value="cancel" class="reply_button1" onclick="this.form.reset();"/></p>
	  </div>
	</form>
	<div class="clear"></div>
	</div>
    <div class="user_main_right"><A href="#"><img src="<?php 
echo base_url("skin/images/registration_03.jpg");
?>
" alt="" /></A></A></div>
	<div class="clear"></div>
</div>
<?php 
if (isset($msg)) {
    echo "<script type='text/javascript'>";
    echo "alert('", $msg, "');";
    if ($msg == 'Reply successfully!') {
        echo "window.location='", main_url(site_url()), "';";
    }
    echo "</script>";
}
?>
</body>
</html>
コード例 #22
0
ファイル: news.php プロジェクト: 804485808/local_motors
 public function search_news()
 {
     $username = $this->username;
     $act = trim($this->input->post('act', TRUE));
     $page = $this->input->post('page', TRUE) ? $this->input->post('page', TRUE) : 1;
     $page_size = 4;
     $offset = ($page - 1) * $page_size;
     if ($act == 'my_search') {
         $keywords = trim($this->input->post('keywords', TRUE));
         $sql = "SELECT * FROM wl_news WHERE username = '******' AND title like '%{$keywords}%' ORDER BY totime desc Limit {$offset},{$page_size}";
         $sql_1 = "SELECT COUNT(*) AS COUNTER FROM wl_news WHERE username = '******' AND title like '%{$keywords}%'";
         $query = $this->db->query($sql);
         $query_1 = $this->db->query($sql_1);
         $news_list = $query->result_array();
         $count = $query_1->result_array();
         $count = $count[0]['COUNTER'];
     } elseif ($act == 'type_search') {
         $type = trim($this->input->post('type', TRUE));
         if ($type == 'Recycle bin') {
             $status = 5;
         } elseif ($type == 'Pending Review') {
             $status = 1;
         } elseif ($type == 'Unapproved') {
             $status = 2;
         } elseif ($type == 'Published') {
             $status = 3;
         } elseif ($type == 'Expired') {
             $status = 4;
         }
         $news_list = $this->comm->findAll("news", array("username" => $username, "status" => $status), "totime desc", "", "{$offset},{$page_size}");
         $count = $this->comm->findCount("news", array("username" => $username, "status" => $status));
     }
     $total_page = ceil($count / $page_size);
     $str = "";
     $str .= "<div class='inbox2_right4'>";
     if ($news_list) {
         $site = $this->config->item('site');
         foreach ($news_list as $k => $v) {
             $str .= "<div class='inbox2_right4_1a'>";
             $str .= "<div class='inbox2_right41'>";
             $str .= "<div class='inbox2_right3_1 inbox2_right3_11'><input name='C" . $k . "' type='checkbox' value='" . $v['itemid'] . "' /></div>";
             $str .= "<div class='inbox2_right3_1 inbox2_right3_12  border_none'><img width='25' height='25'  src='" . $site['image_domain'] . $v['thumb'] . "' /></div>";
             $str .= "<div class='buy_l_t border_none'><strong><a href='" . main_url(site_url('content/index/' . $v['itemid'] . '/' . $v['linkurl'])) . "'>" . $v['title'] . "(hits:" . $v['hits'] . ")</a></strong></div>";
             $amount = $v['amount'] > 0 ? $v['amount'] . "&nbsp;" . $v['unit'] : 'N/A';
             $totime = $v['totime'] ? date('Y-m-d', $v['totime']) : "2050-12-31";
             $str .= "<div class='buy_l_s border_none'><strong>" . $amount . "</strong></div>";
             $str .= "<div class='buy_l_s border_none'><strong>" . $totime . "</strong></div>";
             $str .= "<div class='buy_l_ss  border_none'>";
             $str .= "<a  title='EDIT' href='" . site_url('user/news/edit_news/' . $v['itemid']) . "'><img src='" . base_url('skin_user/images/edit_01.jpg') . "' /></a>";
             $str .= "<a title='DELETE' href='#' onclick=del_news('" . $v['itemid'] . "-') ><img src='" . base_url('skin_user/images/inm_28.jpg') . "' /></a>";
             $str .= "</div><div class='clear'></div></div>";
             $str .= "<div class='inbox2_right42a'>" . mb_substr(strip_tags($v['introduce']), 0, 235, 'utf-8') . "......</div></div>";
         }
     } else {
         $str .= "<br/><br/><center>No Matching Results</center>";
     }
     $str .= "</div>";
     $str .= "<div style='padding-top:5px;padding-bottom:5px;'>";
     $str .= "<div class='black-red'><span class='disabled'>";
     if ($total_page > 1) {
         foreach (range(1, $total_page) as $v) {
             if ($v == $page) {
                 $str .= '&nbsp;&nbsp;<span class="current">' . $v . '</span>&nbsp;&nbsp;';
             } else {
                 if ($act == 'my_search') {
                     $function = "search(this.innerHTML)";
                 } elseif ($act == 'type_search') {
                     $function = "search_news('{$type}',this.innerHTML)";
                 }
                 $str .= '&nbsp;&nbsp;<span onclick=' . $function . " style='cursor:pointer'>" . $v . '</span>&nbsp;&nbsp;';
             }
         }
     }
     $str .= "</span></div>";
     $str .= "</div>";
     $this->output->set_output($str);
 }
コード例 #23
0
 public function upload_mediaplan_pdf()
 {
     //print_r($_REQUEST);die;
     require_once PHYSICAL_PATH . "smtpmail/PHPMailerAutoload.php";
     $six_digit_random_number = '';
     $customer_username = '';
     $documentdeal1 = '';
     $getcustomer_leagalname = '';
     $legal_company_name = '';
     $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_firstname = $GetContact->contact_person_first_name;
             $contact_lastname = $GetContact->contact_person_last_name;
             //$contact_email1='*****@*****.**';
             $getcustomer_id = $GetContact->customer_id;
             $getcustomer_leagalname = $this->customers_model->getcompanyname($ListingUserid);
             $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 = 'Hej,' . $getcustomer_leagalname . '<br/>';
             $msg .= 'Anvand inloggingsuppgiftterna nedan for att logga in och ta del aVer mediaplan:<br/>';
             $msg .= 'Anvandanamn : ' . $customer_username . '<br/>';
             $msg .= 'Losenord : ' . $six_digit_random_number . '<br/>';
             $msg .= 'Lank for att logga in : ' . $link . '<br/>';
             $msg .= 'Har ni fragor fims jag tillgangllg pa emailaddress of the mediaplaner eller pa telefan:"nabullenr of mediaplaner"';
             $msg .= 'Med vanling Halsning<br/>';
             $msg .= $contact_firstname . "    " . $contact_lastname;
             $body_final = $msg;
             $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 = '******';
             // SMTP username
             $mail->Password = '******';
             // SMTP password
             $mail->SMTPSecure = 'tls';
             // Enable encryption, 'ssl' also accepted
             $mail->From = '*****@*****.**';
             $mail->FromName = $site_name_value;
             //echo "****".$customeremail;die;
             $config['upload_path'] = 'file/order_file/';
             //$mail->WordWrap = 50;                                 // Set word wrap to 50 characters
             //$mail->addAttachment($config['upload_path'].$documentdeal);
             $mail->addAddress($contact_email);
             // Add a recipient
             $mail->isHTML(true);
             $mail->Subject = $head;
             $mail->Body = $body_final;
             $mail->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);
     }
     /*** adding activity***/
     //$twodayletter  = mktime(0, 0, 0, date("Y"),date("m"),date("d")+2 );
     $date = date('Y-m-d');
     $date = strtotime($date);
     $date = strtotime("+2 day", $date);
     $twodayletter = date('Y-m-d', $date);
     $cureentime = date("H:i:s");
     $inarraynew = array('customer_id' => $ListingUserid, 'user_id' => $this->session->userdata('id'), 'date' => date('Y-m-d'), 'from_time' => $cureentime, 'end_date' => $twodayletter, 'till_time' => '11.5', 'priority' => 1, 'activity_type' => 1, 'customer_approved_status' => 2);
     $this->db->insert('admin_activity', $inarraynew);
     //echo	$this->db->last_query();die;
 }
コード例 #24
0
ファイル: sell_list.php プロジェクト: 804485808/local_motors
<!--product last start-->

<div class="product_detailsmian">
<div class="motors-ProductDetailspage">
<div class="product_Hierarchy product_Hierarchy_margin"> <span> <a href="<?php 
echo main_url(site_url());
?>
">Home</a> » <a href="<?php 
echo site_url("catalog/index/" . $parent['catid'] . "/" . $parent['linkurl']);
?>
" id="M_menu"><?php 
echo $parent['catname'];
?>
»</a> <?php 
echo $nowcat['catname'];
?>
 </span>
    <div class="Level_menu">
        <ul>
            <?php 
foreach ($oneCategory as $k => $v) {
    ?>
            <li><a href="<?php 
    echo site_url("catalog/index/" . $v['catid'] . "/" . $v['linkurl']);
    ?>
"><?php 
    echo $v['catname'];
    ?>
</a></li>
            <?php 
}
コード例 #25
0
                    <div class="suppliers_Hotproductlast">
                        <div class="suppliers_Hotproductimg"><a title="<?php 
    echo $v['subtitle'];
    ?>
" href="<?php 
    echo main_url(site_url('sell_detail/index/' . $v['itemid'] . '/' . $v['linkurl']));
    ?>
"><img src="<?php 
    echo $site['image_domain'] . $v['thumb'];
    ?>
" class="image-fluid" alt=""></a></div>
                        <span><a title="<?php 
    echo $v['subtitle'];
    ?>
" href="<?php 
    echo main_url(site_url('sell_detail/index/' . $v['itemid'] . '/' . $v['linkurl']));
    ?>
"><?php 
    echo substr($v['title'], 0, 30);
    ?>
</a></span>
                    </div>
                    <?php 
}
?>

                </li>
                <li>
                    <div class="suppliers_Hotproductlast">
                        <div class="suppliers_Hotproductimg"><a href=""><img src="images/Suppliersimg/Supplers_05.jpg" class="image-fluid" alt=""></a></div>
                        <span><a href="">These motors belong to phase </a></span></div>
コード例 #26
0
 $mysqlemail = mysql_query($email_template);
 $emailtemplate = mysql_fetch_array($mysqlemail);
 $adminorder = "SELECT * from admin_order where customer_id='" . $customerid . "' and corn_order='1' ORDER BY 'id' DESC limit 0,1";
 $adminorderinfo = mysql_query($adminorder);
 $orderinfo = mysql_fetch_array($adminorderinfo);
 $suplier_id = $orderinfo['supplier_id'];
 $seletsupplier = "SELECT * from people where id='" . $suplier_id . "'";
 $supinfo = mysql_query($seletsupplier);
 $supinfo = mysql_fetch_array($supinfo);
 $supemail = $supinfo['email'];
 $username = $supinfo['username'];
 $password = $supinfo['unicidforcorn'];
 $head = $emailtemplate['subject'];
 //$head=htmlentities($head);
 $head_final = $head;
 $link = main_url() . 'mediahelp/index.php/supllier';
 $body_template = $emailtemplate['details'];
 $body = str_replace(array('[COMPANYNAME]', '[CONTACTPERSON]', '[EMAIL]', '[PHONE]', '[LINK]', '[USERNAME]', '[PASSWORD]'), array($legalcompanyname, $cname, $cemail, $cphone, $link, $username, $password), $body_template);
 //$body_customer=htmlentities($body);
 $body_customer = $body;
 $mail = new PHPMailer();
 $mail->CharSet = 'UTF-8';
 $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 = '******';
 // SMTP username
 $mail->Password = '******';
コード例 #27
0
?>
</title>
<link href="<?php 
echo base_url("skin_user/css/user.css");
?>
" rel="stylesheet" type="text/css" />

</head>
<body>
<div class="head">
  <div class="head_top2">
	<div class="logo"><a href="<?php 
echo site_url();
?>
"><img src="<?php 
echo main_url(base_url("skin/images/logo.jpg"));
?>
" alt="" /></a></div>
	<div class="head_top2_c">Free Membership Registration</div>
	<div class="head_top2_right">Already a Member?<a href="<?php 
echo site_url("reg_login/login_in");
?>
">Sign in here.</a></div>
	<div class="clear"></div>
</div>
</div>
<div class="user_main">
	<div class="user_main_left">
		<div class="user_main_left1">
			<div class="user_main_left1_1">Start Your Online Business with <?php 
echo $site['site_name'];
コード例 #28
0
ファイル: login.php プロジェクト: 804485808/local_motors
echo $password ? $password : '';
?>
" onpaste="return false" oncontextmenu="return false" oncopy="return false" oncut="return false"/>
		<div class="signin_bot" style="margin-top:10px;"><a href="#"  onclick="check_log()">Sign In</a></div>
		<div class="signin_join" style="margin-top:10px;"><a href="<?php 
echo main_url(site_url("reg_login/register"));
?>
">Join Free Now</a></div>
        <h1 style="padding-top:0px;"><a href="<?php 
echo main_url(site_url("reg_login/forget_password"));
?>
">Forgot password?</a></h1>
		</form>
	</div>
    <div class="clear"></div>
    </div>
    <div class="clear"></div>
</div>
<?php 
if ($msg) {
    echo "<script type='text/javascript'>";
    if ($msg['code']) {
        echo "window.location.href='", main_url(site_url('user/user_main/index')), "';";
    } else {
        echo "alert('", $msg['msg'], "');";
    }
    echo "</script>";
}
?>
</body>
</html>
コード例 #29
0
 public function upload_mediaplan_pdf()
 {
     //print_r($_REQUEST);die;
     require_once PHYSICAL_PATH . "smtpmail/PHPMailerAutoload.php";
     $six_digit_random_number = '';
     $customer_username = '';
     $documentdeal1 = '';
     $getcustomer_leagalname = '';
     $legal_company_name = '';
     $pepemail = '';
     $pepphone = '';
     $num = "";
     $contact_personid = $this->input->post('contact_person_name');
     $ListingUserid = $this->input->post('ListingUserid');
     $site_email = trim($this->customers_model->getsiteemail());
     $site_pwd = trim($this->customers_model->getadmin_pwd());
     $getemailnumber = $this->customers_model->get_email_no($ListingUserid);
     if ($getemailnumber == 0 || $getemailnumber == 39) {
         $num = 25;
     } else {
         $num = $getemailnumber + 1;
     }
     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++) {
             $site_email = trim($this->customers_model->getsiteemail());
             $GetContact = $this->customers_model->getonecontactperson($contact_personid[$j]);
             $contact_email = $GetContact->contact_person_email;
             $contact_firstname = $GetContact->contact_person_first_name;
             $contact_lastname = $GetContact->contact_person_last_name;
             //$contact_email1='*****@*****.**';
             $getcustomer_id = $GetContact->customer_id;
             $getcustomer_leagalname = $this->customers_model->getcompanyname($ListingUserid);
             $getpeopleinfo = $this->customers_model->getpeople($ListingUserid);
             $pepemail = $getpeopleinfo->email;
             $pepphone = $getpeopleinfo->phone_number;
             $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';
             $contact_firstname = htmlentities($contact_firstname);
             $contact_lastname = htmlentities($contact_lastname);
             // mail//
             $confull = $contact_firstname . "    " . $contact_lastname;
             $email_template = $this->getemail($num);
             $head = $email_template->subject;
             $head = htmlentities($head);
             //$head_final=str_replace(array('[PRODUCTNAME]'),array($product_name),$head);
             $body_template = $email_template->details;
             $body = str_replace(array('[CONTACTNAME]', '[CUSTOMERUSERNAME]', '[SIXDIGITNUMBER]', '[LINK]', '[PEPEMAIL]', '[PEPPHONE]', '[CONTACTPERSONNAME]'), array($contact_firstname, $customer_username, $six_digit_random_number, $link, $pepemail, $pepphone, $confull), $body_template);
             //$body_template=htmlentities($body);
             $body_final = $body;
             // end//
             $mail = new PHPMailer();
             $mail->CharSet = 'UTF-8';
             $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 = $site_email;
             // SMTP username
             $mail->Password = $site_pwd;
             // SMTP password
             $mail->SMTPSecure = 'tls';
             // Enable encryption, 'ssl' also accepted
             $mail->From = $site_email;
             $mail->FromName = $site_name_value;
             //echo "****".$customeremail;die;
             $config['upload_path'] = 'file/order_file/';
             //$mail->WordWrap = 50;                                 // Set word wrap to 50 characters
             //$mail->addAttachment($config['upload_path'].$documentdeal);
             $mail->addAddress($contact_email);
             // Add a recipient
             //$contact_email
             $mail->isHTML(true);
             $mail->Subject = $head;
             $mail->Body = $body_final;
             $mail->send();
         }
         // updateing email number
         $this->db->where("id", $ListingUserid);
         $arremail = array("email_number" => $num);
         $e = $this->db->update('customers', $arremail);
         // end
         $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);
     }
     // deleteing activity after disapprove//
     $this->db->where('activity_type', 1);
     $this->db->where('customer_approved_status', 0);
     $this->db->where('user_id', $this->session->userdata('id'));
     $this->db->order_by("id", "desc");
     $this->db->limit(1);
     $query = $this->db->get('admin_activity');
     //echo	$this->db->last_query(); die;
     if ($query->num_rows() > 0) {
         $onlyonedata1 = $query->row();
         $delid = $onlyonedata1->id;
         $this->db->where('id', $delid);
         $query = $this->db->delete('admin_activity');
     }
     // deleteing activity after approve
     $this->db->where('activity_type', 1);
     $this->db->where('customer_approved_status', 1);
     $this->db->where('user_id', $this->session->userdata('id'));
     $this->db->order_by("id", "desc");
     $this->db->limit(1);
     $query1 = $this->db->get('admin_activity');
     if ($query1->num_rows() > 0) {
         $onlyonedata2 = $query1->row();
         $delid1 = $onlyonedata2->id;
         $this->db->where('id', $delid1);
         $query = $this->db->delete('admin_activity');
     }
     // old mediaplan delete
     //$this->db->where('id !=',$last_activityid);
     $this->db->where('activity_type', 1);
     $this->db->where('customer_approved_status', 2);
     $this->db->where('user_id', $this->session->userdata('id'));
     $this->db->order_by("id", "desc");
     $this->db->limit(1);
     $query2 = $this->db->get('admin_activity');
     //echo	$this->db->last_query(); die;
     if ($query2->num_rows() > 0) {
         $onlyonedata3 = $query2->row();
         $delid2 = $onlyonedata3->id;
         $this->db->where('id', $delid2);
         $query = $this->db->delete('admin_activity');
         //echo	$this->db->last_query(); die;
     }
     /*** adding activity***/
     //$twodayletter  = mktime(0, 0, 0, date("Y"),date("m"),date("d")+2 );
     $date = date('Y-m-d');
     $date = strtotime($date);
     $date = strtotime("+2 day", $date);
     $twodayletter = date('Y-m-d', $date);
     $cureentime = date("H:i:s");
     $inarraynew = array('customer_id' => $ListingUserid, 'user_id' => $this->session->userdata('id'), 'date' => date('Y-m-d'), 'from_time' => $cureentime, 'end_date' => $twodayletter, 'till_time' => '11.5', 'priority' => 1, 'activity_type' => 1, 'customer_approved_status' => 2, 'responsibilty' => $this->session->userdata('id'));
     $this->db->insert('admin_activity', $inarraynew);
     $last_activityid = $this->db->insert_id();
 }
コード例 #30
0
ファイル: header.php プロジェクト: 804485808/local_motors
    <div class="product-motors-navbar product-motors-collapse" role="navigation">
      <ul>
        <li><a href="<?php 
echo $site['main_domain'];
?>
"><i class="fa fa-home fa-2x fa-color fl"></i>Home</a></li>
        <li><a href="<?php 
echo main_url(site_url("news/index"));
?>
" >Information</a></li>
        <li><a href="<?php 
echo main_url(site_url('company/suppliers'));
?>
" >Suppliers</a></li>
        <li><a href="<?php 
echo main_url(site_url('news/newsList/28'));
?>
" >Exhibition</a></li>
      </ul>
    </div>
  </div>
  
  <!--nav--> 
</header>
<script type="text/javascript">
    $(function() {
        jQuery(document).bind('keydown', function (event){
            if(event.keyCode == 13 && document.getElementById('input_text').value){
                search_sub();
            }
        });