Example #1
0
 /**
  * Extend project bid
  *
  * @access	private
  * @param	project id and checkstamp
  * @return	contents
  */
 function extendBid()
 {
     //Load Language
     $this->lang->load('enduser/viewProject', $this->config->item('language_code'));
     if ($this->input->post('extend')) {
         $prjid = $this->input->post('projectid');
         $condition2 = array('projects.id' => $prjid);
         $res = $this->skills_model->getProjects($condition2);
         $row = $res->row();
         $left = days_left($row->enddate, $prjid);
         if ($left == 'Closed') {
             $enddate = get_est_time() + $this->input->post('openDays') * 86400;
         } else {
             $today = time();
             $lastday = $row->enddate;
             $left = $lastday - $today;
             $val = date('j', $left);
             $open = $val + $this->input->post('openDays');
             $enddate = get_est_time() + $open * 86400;
         }
         $updateKey = array('projects.id' => $this->input->post('projectid'));
         $updateData = array('projects.enddate' => $enddate, 'projects.project_status' => '0');
         $this->skills_model->updateProjects(NULL, $updateData, $updateKey);
         //Notification message
         $this->session->set_flashdata('flash_message', $this->common_model->flash_message('success', $this->lang->line('Your project bid has been extended')));
         redirect('buyer/viewMyProjects');
     }
     $prjid = $this->uri->segment(3, '0');
     $condition = array('projects.id' => $prjid);
     $this->outputData['project'] = $this->skills_model->getProjects($condition);
     $this->load->view('buyer/extend', $this->outputData);
 }
Example #2
0
        }
        if ($this->session->userdata('show_date')) {
            ?>
                                  <td><?php 
            echo get_date($project->created);
            ?>
</td>
                                  <?php 
        }
        if ($this->session->userdata('show_closedate')) {
            ?>
                                  <td><?php 
            echo get_date($project->enddate);
            ?>
 left<?php 
            echo '<b style="color:red;">(' . days_left($project->enddate, $project->id) . '</b>';
            ?>
)</td>
                                  <?php 
        }
        ?>
                                </tr>
                                <tr class="<?php 
        echo $class;
        ?>
">
                                  <td colspan="9"><?php 
        if ($this->session->userdata('show_desc')) {
            ?>
                                    <div class="clsDecrip clsAdd" style="padding:3px 0 3px 10px;"> <?php 
            echo $description = word_limiter($project->description, 50);
Example #3
0
    echo $this->session->flashdata('proposal_success');
    ?>
</div>
               <?php 
}
?>
                <h1 style="color:#4e4e4e"><?php 
echo $job->title;
?>
</h1>
                </div>
                <div class="col-md-3">
                     <div class="col-md-7">
                        <strong>End In(Days)</strong>
                        <h1> <strong><?php 
echo days_left($job->created_at);
?>
</strong> </h1>
                    </div>
                    <div class="col-md-5" style="padding:0px !important">
                        <strong style="text-transform: uppercase"><?php 
echo $job->type;
?>
</strong>
                        <h1><strong>$<?php 
echo $job->rate;
?>
</strong></h1>
                    </div>
                    
                </div>
Example #4
0
    lang('Inspection');
    ?>
</th>
                        </tr>
                    </thead>
                    <tr>
                        <td><?php 
    echo substr($car['inspection_start_date'], 0, 10);
    ?>
</td>
                        <td><?php 
    echo substr($car['inspection_finish_date'], 0, 10);
    ?>
</td>
                        <td><?php 
    echo days_left($car['inspection_finish_date']);
    ?>
 <?php 
    lang('days left');
    ?>
</td>
                    </tr>
                <?php 
}
?>
                <?php 
if ($car['maintenance_start_km']) {
    ?>
                    <thead>
                        <tr>
                            <th colspan="3"><?php 
Example #5
0
                          <!--END OF RC-->

                        </div>

                        <?php 
if ($projectRow->project_status == 0) {
    if (count($tot) > 0) {
        $toDisp = $this->lang->line('Edit Bid');
    } else {
        $toDisp = $this->lang->line('Place Bid');
    }
    ?>

                        <?php 
    //Check for the project open date is end or not
    if (days_left($projectRow->enddate, $projectId) != 'Closed') {
        ?>

                        <p><a href="<?php 
        echo site_url('project/postBid/' . $projectId);
        ?>
" class="buttonBlackShad"><span><?php 
        echo $toDisp;
        ?>
</span></a></p>

                        <br />

                        <?php 
    }
}
Example #6
0
							if($jobRow->flag== 0)
							{
							
								if(days_left($jobRow->enddate,$projectId) != 'Closed')
								 {  ?>
												<p style="padding-left:1em !important;" ><a href="<?php echo site_url('job/postBid/'.$projectId); ?>" class="buttonBlackShad"><span><?php echo $toDisp;?></span></a></p>
												<br />
												<?php 
								 }
							} 
							else
							{
							               $created_date=$jobRow->created;
								           $end_date=$jobRow->enddate;
					                       $next=$created_date+($end_date * 24 * 60 * 60);
											if(days_left($next,$projectId) != 'Closed')
								 {  ?>
												<p style="padding-left:1em !important;"><a href="<?php echo site_url('job/postBid/'.$projectId); ?>" class="buttonBlackShad"><span><?php echo $toDisp;?></span></a></p>
												
												<?php 
								 }
											
							}
						}
						}?>               
                      </div>
                    </div>  </div>

<!--END OF POST JOB-->
<?php $this->load->view('footer'); ?>
    echo "&nbsp;<a href='campaign-banners.php?clientid=" . $clientid . "&campaignid=" . $campaignid . "&expand=all' accesskey='" . $keyExpandAll . "'>" . $strExpandAll . "</a>";
    echo "&nbsp;&nbsp;|&nbsp;&nbsp;";
    echo "<img src='images/" . $phpAds_TextDirection . "/triangle-l.gif' align='absmiddle' border='0'>";
    echo "&nbsp;<a href='campaign-banners.php?clientid=" . $clientid . "&campaignid=" . $campaignid . "&expand=none' accesskey='" . $keyCollapseAll . "'>" . $strCollapseAll . "</a>";
    echo "</td>";
} else {
    echo "<td colspan='2'>&nbsp;</td>";
}
echo "</tr>";
echo "</table>";
echo "<br><br>";
echo "<br><br>";
echo "<table border='0' width='100%' cellpadding='0' cellspacing='0'>";
echo "<tr><td height='25' colspan='2'><b>{$strCreditStats}</b></td></tr>";
echo "<tr><td height='1' colspan='2' bgcolor='#888888'><img src='images/break.gif' height='1' width='100%'></td></tr>";
list($desc, $enddate, $daysleft) = days_left($campaignid);
$adclicksleft = adclicks_left($campaignid);
$adviewsleft = adviews_left($campaignid);
echo "<tr><td height='25'>{$strViewCredits}: <b>{$adviewsleft}</b></td>";
echo "<td height='25'>{$strClickCredits}: <b>{$adclicksleft}</b></td></tr>";
echo "<tr><td height='1' colspan='2' bgcolor='#888888'><img src='images/break-el.gif' height='1' width='100%'></td></tr>";
echo "<tr><td height='25' colspan='2'>{$desc}</td></tr>";
echo "<tr><td height='1' colspan='2' bgcolor='#888888'><img src='images/break.gif' height='1' width='100%'></td></tr>";
echo "</table>";
echo "<br><br>";
/*********************************************************/
/* Store preferences                                     */
/*********************************************************/
$Session['prefs']['campaign-banners.php'][$campaignid]['listorder'] = $listorder;
$Session['prefs']['campaign-banners.php'][$campaignid]['orderdirection'] = $orderdirection;
$Session['prefs']['campaign-banners.php'][$campaignid]['nodes'] = implode(",", $node_array);
 function testSaturdaysEndFeb2014()
 {
     $date = '28/02/2014';
     $sats = days_left(6, $date);
     $this->assertEquals($sats, 0);
 }