Example #1
0
 function profile_image_upload()
 {
     $carpool_session['carpool_session'] = $this->CI->carpool_session->userdata('carpool');
     $id = $carpool_session['carpool_session']['user_id'];
     $filename = $_FILES['profileimg']['name'];
     $size = $_FILES['profileimg']['size'];
     //get the extension of the file in a lower case format
     $ext = $this->getExtension($filename);
     $ext = strtolower($ext);
     $actual_image_name = 'user' . $id . '_profile_' . time() . "." . $ext;
     //config image upload
     $config['allowed_types'] = $this->config->item('acceptable_files');
     $config['upload_path'] = $this->config->item('profile_upload_dir') . 'original';
     $config['file_name'] = $actual_image_name;
     $config['remove_spaces'] = true;
     $this->load->library('upload', $config);
     if ($this->upload->do_upload('profileimg')) {
         $upload_data = $this->upload->data();
         $this->load->library('image_lib');
         //this is the larger image
         $config['image_library'] = 'gd2';
         $config['source_image'] = $this->config->item('profile_upload_dir') . 'original/' . $upload_data['file_name'];
         $config['new_image'] = $this->config->item('profile_upload_dir') . 'source/' . $upload_data['file_name'];
         $config['maintain_ratio'] = TRUE;
         $config['width'] = 160;
         $config['height'] = 204;
         $this->image_lib->initialize($config);
         $this->image_lib->resize();
         $this->image_lib->clear();
         $data['file_name'] = $upload_data['file_name'];
         $param['user_profile_img'] = $data['file_name'];
         $param['user_id'] = $id;
         $uid = $this->Customer_model->save($param);
         if ($uid) {
             echo '<img src="' . theme_profile_img($upload_data['file_name']) . '"  width="100" height="100"  style="top:0px"/>';
         }
     }
     if ($this->upload->display_errors() != '') {
         echo $this->upload->display_errors();
     }
 }
Example #2
0
		<input type="file"  name="profileimg" id="profileimg">
		</div>		      
		</form>

        <div class="tab-content" style="display: block;">
                 <?php 
$attributes = array('id' => 'changepwd');
echo form_open('profile/edit/' . $id, $attributes);
?>
               
            
            <div class="rowrec">
              <div class="profile-pic" id="ProfilePic"> 
              <img src="<?php 
if ($customer->user_profile_img) {
    echo theme_profile_img($customer->user_profile_img);
} else {
    echo theme_img('default.png');
}
?>
" id="old-image" width="100" height="100"> </div>
              <h3 class="profile-hd-tit"> <?php 
echo $customer->user_first_name;
?>
  <a href="javascript:void(0)" id="edit-profile"> (Edit Photo) </a> </h3>
              <div id='imageloadstatus' style="display:none">
                <img src='<?php 
echo theme_img('ajaxloader.gif');
?>
'/> Uploading please wait ....
              </div>   
Example #3
0
//print_r($carpool_session['carpool_session']	);
$id = $carpool_session['carpool_session']['user_id'];
$profile = $this->auth_travel->get_travel($id);
if ($this->auth_travel->is_logged_in(false, false)) {
    ?>
	
            <ul class="top-nav new-top-nav pull-right">
              <li>  <a href="<?php 
    echo base_url('addtrip/form');
    ?>
" class="ride"> Post a Trip </a> </li>
              <li>
                <div id="my-account">
                  <div class="my-account-button">  <div class="profile-img"> <img src="<?php 
    if ($profile->user_profile_img) {
        echo theme_profile_img($profile->user_profile_img);
    } else {
        echo theme_img('default.png');
    }
    ?>
" width="30" height="30"> </div> <span> <?php 
    echo $profile->user_first_name . ' ' . $profile->user_last_name;
    ?>
 </span> <p> <img src="<?php 
    echo theme_img('drop-white.png');
    ?>
"> </p>  </div>
                  <div class="my-account-details" style="display: none">
                    <ul class="nav-set">
                      <li><a href="<?php 
    echo site_url('profile');
Example #4
0
          <div class="row nomargin">
            <div class="rec-rid-tbl">
              <div class="viewport">
                <ul class="overview">
                  <?php 
foreach ($recent_trips as $trip) {
    ?>
                  <li>
                      <a href="<?php 
    echo site_url('trip/tripdetails/' . $trip['trip_led_id']);
    ?>
" target="blank">   
                        <div class="slid_inner">
                          <div class="slid_first"> <img src="<?php 
    if ($trip['user_profile_img']) {
        echo theme_profile_img($trip['user_profile_img']);
    } else {
        echo theme_img('default.png');
    }
    ?>
" width="40">
                            <h3>
                              <?php 
    echo $trip['user_first_name'] . ' ' . $trip['user_last_name'];
    ?>
                            </h3>
                            <p>
                              <?php 
    $source = explode(',', $trip['source']);
    echo (!empty($source[0]) ? $source[0] : '') . (!empty($source[1]) ? ',' . $source[1] : '');
    ?>
Example #5
0
        <h3 class="cs-lgrey-bg padding10"> <span> <img src="<?php 
echo theme_img('driver-ico.png');
?>
"> </span> <?php 
echo lang('driver');
?>
 </h3>

        <div class="rowrec line4"></div>

        <div class="rowrec">

          <div class="fleft paddingright10">
              <a href="javascript:void(0)"> <img src="<?php 
if ($tripdetails['user_profile_img']) {
    echo theme_profile_img($tripdetails['user_profile_img']);
} else {
    echo theme_img('default.png');
}
?>
" class="search-thumb search-user-thumb"> </a>
          </div>
          <div class="fleft paddingtop10">
              <strong class="size16">
                  <a href="javascript:void(0)" class="cs-blue-text"><?php 
echo $tripdetails['user_first_name'] . ' ' . $tripdetails['user_last_name'];
?>
</a>
              </strong><br>
              <small class="size13" > </small>