1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204
|
<?php
//var_dump($rs->image);
$off = $offset + $limit;
$rs->amount = str_replace($site_setting['currency_symbol'], "", $rs->amount);
if($rs->amount == '0' or $rs->amount == '')
{
$w = 0;
}else{
if($rs->amount_get>=$rs->amount)
{
$w=100;
}
else
{
$w = ($rs->amount_get/$rs->amount)*100;
if($w>0 && $w<1)
{
$w=1;
}
}
}
?>
<script type="text/javascript">
$(document).ready(function() {
$('#<?php echo $rs->project_id.'_'.$off; ?>').mouseover(function() {
$('#card_desc_<?php echo $rs->project_id;?>').show();
});
$('#<?php echo $rs->project_id.'_'.$off; ?>').mouseout(function() {
$('#card_desc_<?php echo $rs->project_id;?>').hide();
});
});
</script>
<div class="slider_div" id="<?php echo $rs->project_id.'_'.$off; ?>">
<?php if(1 == $rs->is_back) {?>
<div style="position:absolute;z-index:1000;top:135px;right:8px;background:url(/images/rubon_financial_miniature.png) top left no-repeat;width:110px;height:20px;"><p style="font:normal 14px US101;color:white;margin-top:2px;"><?php echo FINANCIAL_REWARDS;?><p></div>
<?php } ?>
<div>
<?php if(is_file("upload/thumb/".$rs->image)){
echo anchor('projects/'.$rs->project_url,'<img class="project_img" src="'.base_url().'upload/thumb/'.$rs->image.'" alt="" title="'.ucfirst($rs->project_title).'" />');
} else{
$get_gallery=$this->project_model->get_all_project_gallery($rs->project_id);
$grcnt=1;
if($get_gallery)
{
foreach($get_gallery as $glr)
{
if($glr->project_image!='' && is_file('upload/thumb/'.$glr->project_image) && $grcnt==1 )
{
echo anchor('projects/'.$rs->project_url,'<img class="project_img" src="'.base_url().'upload/thumb/'.$glr->project_image.'" alt="" title="'.ucfirst($rs->project_title).'" />');
$grcnt=2;
}
}
}
elseif($grcnt==1)
{
echo anchor('projects/'.$rs->project_url,'<img class="project_img" src="'.base_url().'images/no_img.jpg" alt="" title="'.ucfirst($rs->project_title).'" />');
}
else
{
echo anchor('projects/'.$rs->project_url,'<img class="project_img" src="'.base_url().'images/no_img.jpg" alt="" title="'.ucfirst($rs->project_title).'" />');
}
}
?>
<?php
//echo $rs->amount; echo '123';echo $rs->amount_get; die;
if($rs->amount > 0)
{
if($rs->amount <= $rs->amount_get)
{
?>
<div class="funded_img"></div>
<?php
}
}
?>
</div>
<?php $category=mysql_fetch_array(mysql_query("select * from project_category where project_category_id='".$rs->category_id."'"));?>
<div class="project_cat"><img src="<?php echo base_url();?>images/red-bg.jpg" alt="" style="margin-right:5px;" /><?php if($_SESSION['lang_code'] == 'en') { echo anchor('project/category/'.$rs->category_id,substr(ucfirst($category['project_category_name']),0,25)); } else { echo anchor('project/category/'.$rs->category_id,substr(ucfirst($category['project_category_name_fr']),0,25)); }?></div>
<h3><?php
/*$str_name=$rs->project_title;
if(strlen($str_name)<25)$lenght=strlen($str_name);
else $lenght=25;
//echo "<br>".$lenght;
$pos = strpos($str_name, ' ', $lenght);
if ($pos !== false) {
$str_name= substr($str_name, 0, $pos);
}*/
$str_name = substr(ucfirst($rs->project_title),0,35);
//$str_name = wordwrap(substr(strip_tags($rs->project_title),0,20),20, "\n",true);
echo anchor('projects/'.$rs->project_url,$str_name,'style="text-decoration:none;"'); ?></h3>
<?php $user = $this->home_model->get_user_detail($rs->user_id); ?>
<p><?php echo BY; ?> <?php echo anchor('member/'.$rs->user_id,$user['user_name']); ?></p>
<!--<div id="flag_div">
<div id="flagsr" style="float:left;"><img src="<?php //echo base_url(); ?>images2/flag.png" border="0" /></div>
<div id="flag_detailsr"><small style="text-align:left; font-style:italic; color:#999999; font-weight:normal;"><span style="text-transform:capitalize;"><?php //if($rs->project_city=='' and $rs->project_country==''){ echo 'N/A'; } else { if($rs->project_city==''){ echo 'N/A'; } else{ echo $rs->project_city; } ?></span>,<span style="text-transform:capitalize;"><?php //if($rs->project_country==''){ echo 'N/A'; } else{ echo $rs->project_country; } } ?></span></small> </div>
</div>-->
<?php $backers=$this->project_model->get_all_backers($rs->project_id);?>
<div class="funded_div">
<div class="funded" style="width:68px;"><img src="<?php echo base_url();?>images/man_img.png" alt="" />
<span>
<strong><?php if($backers){ echo count($backers); } else{ echo '0'; }?></strong>
</span>
</div>
<?php
/*$date1 = $rs->end_date;
$date2 = date("Y-m-d");
$diff = abs(strtotime($date2) - strtotime($date1));
$test = floor($diff / (60*60*24));
echo ($rs->end_date!="0000-00-00")?$test." ".DAYS_LEFT:"0 ".DAYS_LEFT;*/
if($rs->unlimited_days != 1)
{
?>
<div class="funded">
<img src="<?php echo base_url();?>images/clock.png" alt="" />
<span>
<strong>
<?php echo $this->project_model->get_days_left($rs->end_date); ?>
</strong>
</span>
</div>
<?php
}
?>
<div class="funded" style="float:right;"><strong><?php echo round($w); ?>%</strong></div>
</div>
<div class="gray_bar">
<div class="fund_txt">
<?php if($w=='0')
{
echo "0".$site_setting['currency_symbol'];
}
else
{
if($rs->amount_get=='')
{
echo "0".$site_setting['currency_symbol'];
}
else
{
echo number_format(round($rs->amount_get),0,'',' ').$site_setting['currency_symbol'];
}
}
?>
<span style="font-size:14px;font-weight:normal;">/<?php if($rs->amount == '0' or $rs->amount == '') { echo '0'.$site_setting['currency_symbol']; } else { echo number_format($rs->amount,0,'',' ').$site_setting['currency_symbol'];}?></span></div>
<div class="red_bar" style="width:<?php echo $w + 2; ?>%;max-width:100%;"></div>
</div>
<a href="<?php echo site_url('projects/'.$rs->project_url);?>"><div class="card_desc" id="card_desc_<?php echo $rs->project_id;?>"><?php if($rs->project_summary!='') {
//echo wordwrap(substr(strip_tags($rs->project_summary),0,95),26, "\n",true);
$str_name=$rs->project_summary;
if(strlen($str_name)<120)$lenght=strlen($str_name);
else $lenght=120;
//echo "<br>".$lenght;
$pos = strpos($str_name, ' ', $lenght);
if ($pos !== false) {
$str_name= substr($str_name, 0, $pos);
}
echo $str_name;
} ?>
</div></a>
</div> |
Partager