Exemple #1
0
function stringShorter($str, $len = 0)
{
    $len = (int) $len;
    $unsanaprotit = unsanitize_string(ucfirst($str));
    $protit_len = strlen($unsanaprotit);
    if ($protit_len >= $len) {
        echo substr($unsanaprotit, 0, $len) . '...';
    } else {
        echo substr($unsanaprotit, 0, $len);
    }
}
   <div id="inbox" class="head_content temp">
   <?php 
if ($_GET['type'] != 'edit') {
    ?>
       <h3>Make update on <?php 
    echo unsanitize_string($sel_project_detail['projectTitle']);
    ?>
</h3>
   <?php 
} else {
    $sel_project_id = mysql_fetch_assoc($con->recordselect("SELECT * FROM projectupdate WHERE projectupdateId='" . $_GET['projectId'] . "'"));
    $sel_project_name = mysql_fetch_assoc($con->recordselect("SELECT * FROM projectbasics WHERE projectId='" . $sel_project_id['projectId'] . "'"));
    ?>
 
          <h3>Edit update on <?php 
    echo unsanitize_string($sel_project_name['projectTitle']);
    ?>
</h3>
   <?php 
}
?>
   </div>
   <div class="wrapper">
        <div class="tabs_content_bg">
            <div class="tab_content">
            <?php 
if ($_GET['type'] = 'edit') {
    $sel_projectupdateinfo = mysql_fetch_assoc($con->recordselect("SELECT * FROM projectupdate WHERE projectupdateId='" . $_GET['projectId'] . "'"));
}
?>
            <form action="<?php 
			<?php 
                }
                ?>
			 
			 <?php 
            }
            ?>
             
             
             
             </center></td>
			<td ><div class="protit"><a title="Click here to view project detail" href="javascript:void(0);" onclick="javascript:openPopup('<?php 
            echo $sel_project_all["projectId"];
            ?>
');"><?php 
            echo unsanitize_string(ucfirst($sel_project_all['projectTitle']));
            ?>
</a></div></td>
			<td ><?php 
            echo $project_category['categoryName'];
            ?>
</td>
			<td  ><div class="shrtblrb"><?php 
            echo $sel_project_all['shortBlurb'];
            ?>
</div></td>
			<td ><div ><?php 
            echo $sel_project_all['projectLocation'];
            ?>
</div></td><!--class="proloc"-->
			<td class="icon" width="7%">
    }
    ?>
 > <?php 
    echo $word;
    ?>
 </option>
                            <?php 
}
?>
                        </select>
                    <div class="clear"></div>
               </div>
                <div class="attribute_box">
                    <h6>Biography</h6>
                    <textarea class="" cols="40" id="user_biography" name="biography" rows="20"><?php 
echo unsanitize_string($result['biography']);
?>
</textarea>
                    <p>We suggest a short bio. If it's 300 characters or less it'll look great on your profile.</p>
                    <div class="clear"></div>
               </div>
               
               <div class="attribute_box">
                    <h6>Websites</h6>
                    <input type="text" id="jquery-tagbox-text" class="website" />
                    <span class="input-tip">
						<table class="tbl-website-width tbl-website" width="79%" align="right">
								<?php 
while ($website_res_field = mysql_fetch_assoc($website_res)) {
    echo "<tr><td>";
    echo "<font size='2'>" . $website_res_field['siteUrl'] . "</font>";
            <td width="8%" align="center">Status</td>			
            <td width="18%" align="center">Date</td>							
		  </tr>
		  </thead>
		  <tbody>
			<?php 
if ($query[0] > 0) {
    while ($checkedornot = mysql_fetch_assoc($query[1])) {
        ?>
		  <tr>
		  <?php 
        $project_category = mysql_fetch_array($con->recordselect("SELECT * FROM categories WHERE categoryId ='" . $checkedornot['projectCategory'] . "'"));
        ?>
			
			<td><?php 
        echo unsanitize_string(ucfirst($checkedornot['projectTitle']));
        ?>
</td>
			<td><?php 
        echo $project_category['categoryName'];
        ?>
</td>
			<td><?php 
        echo '$' . $checkedornot['amount'];
        ?>
</td>
            <td><?php 
        echo '$' . $checkedornot['commission'];
        ?>
</td>
			<td><?php 
    	<a href="<?php 
echo SITE_URL . 'browseproject/' . $projectBasic['projectId'] . '/' . Slug($projectBasic['projectTitle']) . '/';
?>
" >
	        <h3><?php 
echo unsanitize_string(ucfirst($projectBasic['projectTitle']));
?>
</h3>
        </a>
        <p id="marginbottom30">by
        	<a href="<?php 
echo SITE_URL . 'profile/' . $projectByUser['userId'] . '/' . Slug($projectByUser['name']) . '/';
?>
" >
        		<?php 
echo unsanitize_string(ucfirst(trim($projectByUser['name'])));
?>
        	</a>
        </p>
    </div>
   <div class="wrapper ">
        <div class="tabs_content_bg">
                <div class="tab_content">
                	<div class="tabs_left">
                    	<div class="tabs_left_pledge">
							<div class="tout_checkout">
							<h1>Check out with Paypal</h1>
							</div>
							<div class="pledges__checkout_summary">
								<dl>
									<dt>Pledge amount</dt>
        if ($fundingAmount != NULL && $fundingAmount > 0) {
            $value = $project_detail['rewardedAmount'];
            $max = $project_detail['fundingGoal'];
        }
        $scale = 1.0;
        if (!empty($max) && $max != 0) {
            $percent = $value * 100 / $max;
        } else {
            $percent = 0;
        }
        if ($percent > 100) {
            $percent = 100;
        }
        ?>
	<p class="textnormal-b"> <?php 
        echo unsanitize_string(ucfirst($project_detail["shortBlurb"]));
        ?>
	<div class="spaser3"></div>
	<p><div class="percentbar content-slider-percentbar">
    	<div style="width:<?php 
        echo round($percent * $scale);
        ?>
%;"></div>
    </div></p>
   <div class="staffpicks-rating textnormal-b">
	  <ul>
		<?php 
        if ($fundingAmount != NULL && $fundingAmount > 0) {
            $value1 = $project_detail['rewardedAmount'];
            $max1 = $project_detail['fundingGoal'];
        }
        ?>
</h2><h6><a href="#">Top ↑</a></h6>
                    <div class="clear"></div>
                        <?php 
        $sel_faq_questionanswer = $con->recordselect("SELECT * FROM `faqquestionanswer` WHERE faqCategoryId='" . $selSubTitle1['faqCategoryId'] . "'");
        while ($selFaqQuestionAnswer = mysql_fetch_assoc($sel_faq_questionanswer)) {
            ?>
                            <h3 id="<?php 
            echo Slug($selFaqQuestionAnswer['faqQuestion']);
            ?>
"><?php 
            echo unsanitize_string($selFaqQuestionAnswer['faqQuestion']);
            ?>
</h3>
                            <p><?php 
            echo unsanitize_string($selFaqQuestionAnswer['faqAnswer']);
            ?>
</p>
                       <?php 
        }
        ?>
 
                </li>
				<?php 
    }
    ?>
                <?php 
}
?>
                <div class="flclear"></div>
            </div>
Exemple #9
0
                ?>
" alt="<?php 
                echo $sel_user_data23['name'];
                ?>
" width="40" height="40"></a></div>
                    <div  class="secondleft"> <span class="username"><a href="<?php 
                echo SITE_MOD . 'user/message.php?id=' . $sel_message23['senderId'] . '&projectId=' . $sel_message23['projectId'];
                ?>
"><?php 
                echo $sel_user_data23['name'];
                ?>
</a></span> <span class="usermessage"><a class="target" href="<?php 
                echo SITE_MOD . 'user/message.php?id=' . $sel_message23['senderId'] . '&projectId=' . $sel_message23['projectId'];
                ?>
"><?php 
                $unsanamsg = unsanitize_string(ucfirst($sel_message23['message']));
                $msg_len = strlen($unsanamsg);
                if ($msg_len > 50) {
                    echo substr($unsanamsg, 0, 50) . '...';
                } else {
                    echo substr($unsanamsg, 0, 50);
                }
                ?>
					 </a></span> </div>
                  </li>
                  <?php 
            }
        }
        $limit_count = $limit_count + 1;
    }
    ?>
                                $html_content .= '<a title="' . unsanitize_string(ucfirst($sel_starproject_cat['categoryName'])) . '" href="' . SITE_URL . 'category/' . $sel_starproject_cat['categoryId'] . '/' . Slug($sel_starproject_cat['categoryName']) . '/' . '">' . unsanitize_string(ucfirst($sel_starproject_cat['categoryName'])) . '</a>';
                            } else {
                                $html_content .= '<a title="' . unsanitize_string(ucfirst($sel_starproject_cat['categoryName'])) . '" href="javascript:void(0);">
                                                        ' . unsanitize_string(ucfirst($sel_starproject_cat['categoryName'])) . '
                                                    </a>';
                            }
                            $html_content .= '</li>
                                            <img src="' . SITE_IMG . 'location.png" />
                                            <li>
                                            	<a title="' . unsanitize_string(ucfirst($sel_starproject['projectLocation'])) . '" href="' . SITE_URL . 'city/' . $sel_starredproject1['projectId'] . '/' . Slug($sel_starproject['projectLocation']) . '/' . '">
													' . unsanitize_string(ucfirst($sel_starproject['projectLocation'])) . '
                                                </a>
                                            </li>
                                            <div class="clear"></div>
                                        </ul>
                                        <p>' . unsanitize_string(ucfirst($sel_starproject['shortBlurb'])) . '</p>';
                            $chktime_cur = time();
                            if ($sel_starproject['projectEnd'] <= $chktime_cur) {
                                $html_content .= '<h4 class="sticker">';
                                if ($sel_starproject['rewardedAmount'] >= $sel_starproject['fundingGoal']) {
                                    $html_content .= 'SUCCESSFUL!';
                                } else {
                                    $html_content .= 'FUNDING UNSUCCESSFUL';
                                }
                                $html_content .= '</h4>';
                            }
                            $html_content .= '<div class="clear"></div>';
                            if ($fundingAmount != NULL && $fundingAmount > 0) {
                                $value = $sel_starproject['rewardedAmount'];
                                $max = $sel_starproject['fundingGoal'];
                            }
?>
                </a>
				</div>
                <div class="project_profile_right1">
                <a title="<?php 
echo unsanitize_string($sel_project_detail['projectTitle']);
?>
" href="<?php 
echo SITE_URL;
?>
browseproject/<?php 
echo $sel_project_detail['projectId'] . '/' . Slug($sel_project_detail['projectTitle']) . '/';
?>
">
                	<?php 
echo unsanitize_string($sel_project_detail['projectTitle']);
?>
                </a>
                
                <?php 
/*?><h6>By <?php echo $sel_project_user['name'] ?></h6><?php */
?>
                <h6>By <?php 
echo $sel_creator_name1['name'];
?>
</h6>
                
                <p>Funding ends <?php 
echo date('l M d\\, h:ia ', $sel_project_detail['projectEnd']);
?>
 EDT</p>
            }
            $content .= '</a>
								</div>';
            $chktime_cur = time();
            if ($sel_project2['projectEnd'] <= $chktime_cur) {
                if ($sel_project2['rewardedAmount'] >= $sel_project2['fundingGoal']) {
                    $content .= '<div class="project-pledged-successful">SUCCESSFUL!</div>';
                } else {
                    $content .= '<div class="project-pledged-empty"></div>';
                }
            } else {
                $content .= '<div class="project-pledged-empty"></div>';
            }
            $content .= '<div class="spaser-small"></div>
								
								<div class="spaser1 display_descraption">' . unsanitize_string(ucfirst($sel_project2['shortBlurb'])) . '</div>
															
								<div class="spaser-small"></div>
								<div class="gray-line"></div>';
            $fundingAmount = (isset($sel_project2['fundingGoal']) or !empty($sel_project2['fundingGoal'])) ? $sel_project2['fundingGoal'] : 0;
            if ($fundingAmount != NULL && $fundingAmount > 0) {
                $value = $sel_project2['rewardedAmount'];
                $max = $sel_project2['fundingGoal'];
            }
            $scale = 1.0;
            if (!empty($max) && $max != 0) {
                $percent = $value * 100 / $max;
            } else {
                $percent = 0;
            }
            if ($percent > 100) {
            ?>
">
                            <?php 
            echo unsanitize_string(ucfirst($sel_backedproject1['projectTitle']));
            ?>
                        </a>
                        <?php 
        } else {
            if ($sel_backprojectacceptedterms['accepted'] == '3') {
                ?>
                        <a title="<?php 
                echo unsanitize_string(ucfirst($sel_backedproject1['projectTitle']));
                ?>
" href="#">
                            <?php 
                echo unsanitize_string(ucfirst($sel_backedproject1['projectTitle']));
                ?>
                        </a>
                        <?php 
            }
        }
        ?>
                        <h6><?php 
        echo date('M d', $sel_backedproject1['backingTime']);
        ?>
</h6>
                        <div class="clear"></div>
                    </div>
                    
                    <div class="backed_ammount backed_ammount1">
                       	<?php 
                            </a>
                            
                            <h6><?php 
            echo date('M d', $sel_message['messageTime']);
            ?>
</h6>
                            
                            <div class="clear"></div>
                        </div>
                        <div class="clm2">
                            <h5><?php 
            echo unsanitize_string(ucfirst($sel_project_detail1['projectTitle']));
            ?>
</h5>
                            <p><?php 
            echo unsanitize_string($sel_message['message']);
            ?>
</p>
                        </div>
                         <div class="clm3">
                            <h4><?php 
            echo $sel_message_count['countreply'];
            // echo $sel_message['messageId'];
            ?>
</h4>
                        </div>
                     
                       
                	<div class="clear"></div>
                     
            	</div>
        ?>
                    <li><a title="<?php 
        echo ucfirst(unsanitize_string($row['categoryName']));
        ?>
" href="<?php 
        echo SITE_URL;
        ?>
category/<?php 
        echo $row['categoryId'] . '/' . Slug($row['categoryName']) . '/';
        ?>
" 
					<?php 
        if (isset($_GET['catId']) && ($_GET['catId'] != NULL && !isset($titlename)) && $_GET['catId'] == $row['categoryId']) {
            echo "class='active'";
        }
        ?>
><?php 
        echo ucfirst(unsanitize_string($row['categoryName']));
        ?>
</a></li>
                <?php 
    }
    ?>
            
        </div>
        <?php 
}
?>
	
      </ul>
</div>
				<?php 
    if ($term != '') {
        while ($selFaqSearch = mysql_fetch_assoc($sel_faq_search)) {
            $sel_main_cat = mysql_fetch_assoc($con->recordselect("SELECT * FROM faqcategory WHERE faqCategoryId='" . $selFaqSearch['faqCategoryParentId'] . "'"));
            $sel_sub_cat = mysql_fetch_assoc($con->recordselect("SELECT * FROM faqcategory WHERE faqCategoryId='" . $selFaqSearch['faqCategoryId'] . "'"));
            ?>
                          <h3><?php 
            echo unsanitize_string($selFaqSearch['faqQuestion']);
            ?>
</h3>
                          <div class="faq-category">in <?php 
            echo $sel_main_cat['faqcategoryName'] . ' / ' . $sel_sub_cat['faqcategoryName'];
            ?>
</div>
                          <p><?php 
            echo unsanitize_string($selFaqSearch['faqAnswer']);
            ?>
</p>
                        
                <?php 
        }
    }
    ?>
            </div>
			<?php 
}
?>
        </div>
      </div>
    </div>
    <div class="clear"></div>
        echo ucfirst(unsanitize_string($row['projectLocation']));
        ?>
" href="<?php 
        echo SITE_URL;
        ?>
city/<?php 
        echo $row['projectId'] . '/' . Slug($row['projectLocation']) . '/';
        ?>
" <?php 
        if (isset($titlename) && $titlename == $row['projectLocation']) {
            echo "class='active'";
        }
        ?>
>
						<?php 
        $unsanaprotit = unsanitize_string(ucfirst($row['projectLocation']));
        $protit_len = strlen($unsanaprotit);
        if ($protit_len > 35) {
            echo substr($unsanaprotit, 0, 35) . '...';
        } else {
            echo substr($unsanaprotit, 0, 35);
        }
        ?>
                    </a></li>
                <?php 
    }
}
?>
   
            </ul>
        </div>
 function takePreApprovalFromBacker_sendCreatormail($array)
 {
     extract($array);
     //$this->con->insert("insert into preapproval_detail (detail) values ('a')");
     if ($backer_id != '') {
         $projectBacker = mysql_fetch_array($this->con->recordselect("SELECT name FROM users where userId='{$backer_id}' LIMIT 1"));
         $backer_name = $projectBacker['name'];
     }
     $projectCreater = mysql_fetch_array($this->con->recordselect("SELECT * FROM projects as pro, users as usr, projectbasics as pb where pro.projectId=" . $projectId . " and pro.userId=usr.userId AND pb.projectId =" . $projectId));
     if ($projectCreater['pledgeMail'] == 1) {
         $artical1 = "";
         $artical1 = "<html><head><style>.body{font-family:Arial, Helvetica, sans-serif; font-size:12px; }</style></head>";
         $artical1 .= "<body><strong>Hello " . $projectCreater['name'] . ", </strong><br />";
         $artical1 .= "<br />";
         $artical1 .= $backer_name . " has committed {$amount} to your project <b>" . unsanitize_string(ucfirst($projectCreater['projectTitle'])) . "</b><br />";
         $artical1 .= "You can visit your project page by clicking the following link.<br />\n\t\t\t\t<a href='" . SITE_URL . "browseproject/" . $projectId . "/" . Slug($projectCreater['projectTitle']) . '/' . "' target='_blank'>Click Here</a><br />";
         $artical1 .= "<br /><br />Regards,<br />" . DISPLAYSITENAME . " Team</body></html>";
         $subject1 = "New backing for " . unsanitize_string(ucfirst($projectCreater['projectTitle']));
         $mailbody1 = $artical1;
         $headers1 = "MIME-Version: 1.0\r\n";
         $headers1 .= "Content-type: text/html\r\n";
         $headers1 .= FROMEMAILADDRESS;
         @mail(base64_decode($projectCreater['emailAddress']), $subject1, $mailbody1, $headers1);
         @mail('admin@' . $_SERVER['SERVER_NAME'], 'cc: ' . $subject1, $mailbody1, $headers1);
     }
 }
 $i = 0;
 $j = 0;
 $sentEmails = array();
 $failEmails = array();
 for ($k = 0; $k < $loopLimit; $k++) {
     $sel_newsletter_email = $con->recordselect("SELECT * FROM users WHERE userId = '" . $_POST['newsusers'][$k] . "'");
     $val = mysql_fetch_assoc($sel_newsletter_email);
     $artical = "";
     //tableborder { border: 1px solid #CCCCCC; }
     $artical = "<html><head><style>.body{font-family:Arial, Helvetica, sans-serif; font-size:12px; }\n\t\t\t\t.mtext {font-family: Arial, Helvetica, sans-serif;font-size: 12px;color: #333333;text-decoration: none;}\n\t\t\t\ta { font-family: Arial, Helvetica, sans-serif;font-size: 12px;color: #A11B1B;font-weight: normal;text-decoration: underline;}\n\t\t\t\ta:hover {font-family: Arial, Helvetica, sans-serif;font-size: 12px;font-weight: normal;color: #A11B1B;text-decoration: none;}\n\t\t\t\t</style></head>";
     $artical .= "<body><strong>Hello " . $val['name'] . ", </strong><br /><br />";
     $artical .= "<br /><table width='100%' cellspacing='0' cellpadding='0' class='tableborder' align='center'>";
     /*$artical.="<tr>
     		<td height='80' style='border-bottom:solid 1px #f2f2f2; padding:5px; background-color: #999999;' valign='middle'><img src='".SITE_IMG."logo_fundraiser.png' /></td>
     	  </tr>";*/
     $artical .= "<tr><td colspan='2'>" . unsanitize_string($sel_newsletter1['content']) . "</td></tr>";
     $artical .= "<tr><td colspan='2'>&nbsp;</td></tr>";
     /*$artical.="<tr>
     	<td style='font-family:Arial, Helvetica, sans-serif; font-size:11px; color:#000; text-decoration:none; line-height:30px; border-top:solid 1px #f2f2f2;'>&copy; ".date("Y")." ".DISPLAYSITENAME." , All Rights Reserved.</td>
     	</tr>";*/
     $artical .= "<tr><td colspan='2'>&nbsp;</td></tr></table>";
     $artical .= "<br /><br />Kind Regards, <br />" . DISPLAYSITENAME . " Admin</body></html>";
     $subject = " " . $sel_newsletter1['name'] . "";
     $mailbody = $artical;
     $headers = "MIME-Version: 1.0\r\n";
     $headers .= "Content-type: text/html\r\n";
     $headers .= FROMEMAILADDRESS;
     if (@mail(base64_decode($val['emailAddress']), $subject, $mailbody, $headers)) {
         $sentEmails[] = base64_decode($val['emailAddress']);
         $i = $i + 1;
     } else {
    $sel_pro = mysql_fetch_assoc($con->recordselect("SELECT userId FROM projects WHERE projectId='" . $_GET['project'] . "'"));
    $sel_pro_user123 = $con->recordselect("SELECT * FROM users WHERE userId='" . $sel_pro['userId'] . "'");
    $sel_pro_user = mysql_fetch_assoc($sel_pro_user123);
    if ($_SESSION['userId'] != $sel_pro['userId'] && $sel_pro_user['createdProjectComment'] == '1') {
        $artical1 = "";
        $artical1 = "<html><head><style>.body{font-family:Arial, Helvetica, sans-serif; font-size:12px; }</style></head>";
        $artical1 .= "<body><strong>Hello " . ucfirst($sel_pro_user['name']) . ", </strong><br />";
        $artical1 .= "<br />";
        $artical1 .= ucfirst($_SESSION['name']) . " commented on <b>" . unsanitize_string($sel_pro_basic['projectTitle']) . "</b><br />";
        $artical1 .= "<br />";
        $artical1 .= "<b>Comment:</b>\"" . $projectupdate_comment . "\"<br />";
        $artical1 .= "<br />";
        $artical1 .= "Please visit commented project by clicking on following link.<br />\n\t\t\t<a href='" . $base_url . "browseproject/" . $_GET['project'] . "/" . Slug($sel_pro_basic['projectTitle']) . "/#b' target='_blank'>Click Here</a><br />";
        $artical1 .= "<br />";
        $artical1 .= "<br /><br />Kind Regards,<br />HyperFunder Team</body></html>";
        $subject1 = "Comment on " . unsanitize_string($sel_pro_basic['projectTitle']);
        $mailbody1 = $artical1;
        $headers1 = "MIME-Version: 1.0\r\n";
        $headers1 .= "Content-type: text/html\r\n";
        $headers1 .= FROMEMAILADDRESS;
        //echo base64_decode($sel_pro_user['emailAddress']);exit;
        @mail(base64_decode($sel_pro_user['emailAddress']), $subject1, $mailbody1, $headers1);
    }
    $_SESSION['msgType'] = array('from' => 'user', 'type' => 'error', 'var' => "multiple", 'val' => 'Comment succesfully added.');
    redirect(SITE_URL . "browseproject/" . $_GET['project'] . '/' . Slug($sel_pro_basic['projectTitle']) . '/');
}
//project update comment code  for single update  over
// message code start
if (isset($_POST["user_message"])) {
    extract($_POST);
    $message_time = time();
                            ?>
city/<?php 
                            echo $news_array[$i]['projectId'] . '/' . Slug($sel_4_data['projectLocation']) . '/';
                            ?>
">
											<?php 
                            echo ucfirst($sel_4_data['projectLocation']);
                            ?>
										</a>
									</li>
									<div class="clear"></div>
								</ul>
								<span class="activity-icon-quote"></span>
								<blockquote class="activity-project_update-blockquote">
									<?php 
                            $unsanaprotit2 = unsanitize_string($news_array[$i]['updateComment']);
                            $protit_len = strlen($unsanaprotit2);
                            if ($protit_len > 350) {
                                echo substr($unsanaprotit2, 0, 350) . '...';
                            } else {
                                echo substr($unsanaprotit2, 0, 350);
                            }
                            ?>
									<?php 
                            //echo $news_array[$i]['updateComment'];
                            ?>
								</blockquote>
								<div class="clear"></div>
							</div>
							<div class="clear"></div>
						</div>
" >
        	<h3><?php 
echo unsanitize_string(ucfirst($sel_pro_basic['projectTitle']));
?>
</h3>
        </a>
        <p id="marginbottom30">by
        	<a title="<?php 
echo unsanitize_string(ucfirst(trim($sel_pro_user['name'])));
?>
" href="<?php 
echo SITE_URL . 'profile/' . $sel_pro_user['userId'] . '/' . Slug($sel_pro_user['name']) . '/';
?>
" >
        		<?php 
echo unsanitize_string(ucfirst(trim($sel_pro_user['name'])));
?>
        	</a>
        </p>
    </div>
  
   <div class="wrapper">
        <div class="tabs_content_bg">
                <div class="tab_content">
                	<div class="tabs_left">
                    	<form id="projectBacker" name="projectBacker" method="post" action="<?php 
echo $base_url;
?>
projectBacker/">
                    		<div class="tabs_left_pledge">
							<h1>Thanks for your support!</h1>
        ?>
                            </div>
                            </td>
                        </tr> 
                        <tr>
                            <td width="22%" align="center" valign="top"><div align="right"><strong>Newsletter Name: </strong></div></td>
                            <td width="82%" colspan="2" align="center"  bgcolor="#FFFFFF" ><div align="left"><input type="text" id="txtNewsLetterName" name="txtNewsLetterName" size="40" value="<?php 
        echo $sel_EditNewsLetter['name'];
        ?>
" class="logintextbox-bg" /></div></td>         
                        </tr>
                        
                        <tr>
                            <td width="22%" align="center" valign="top"><div align="right"><strong>Newsletter Content : </strong></div></td>
                            <td colspan="2" align="center"  bgcolor="#FFFFFF"><div align="left"><textarea id="content" name="content_newsletter" style="height:200px;" class="height400"><?php 
        echo unsanitize_string($sel_EditNewsLetter['content']);
        ?>
</textarea></div></td>         
                        </tr>
                        
                        <tr>
                            <td width="22%" align="center"  bgcolor="" class="whiteBold_text"><div align="right"><strong>&nbsp; </strong></div></td>
                            <td colspan="2" align="center"  bgcolor="#FFFFFF" class="whiteBold_text">
                            
                            <div align="left">
                            <?php 
        if ($_REQUEST['action'] == 'view') {
            ?>
                             <input type="image" name="sendMail" title="Send" value="Send Email" src="<?php 
            echo SITE_ADM_IMG;
            ?>
     $startDate = time();
     $endDate = $startDate + $days;
     /* echo "UPDATE projectbasics SET projectStart='".$startDate."' AND projectEnd='".$endDate."' WHERE projectId = '".$projectId."'";exit;*/
     $con->update("UPDATE projectbasics SET projectStart='" . $startDate . "' WHERE projectId = '" . $projectId . "'");
     $con->update("UPDATE projectbasics SET projectEnd='" . $endDate . "' WHERE projectId = '" . $projectId . "'");
     $sel_projectUser = mysql_fetch_array($con->recordselect("SELECT * FROM `users` WHERE userId = '" . $sel_project['userId'] . "'"));
     $userEmail = base64_decode($sel_projectUser['emailAddress']);
     $userName = $sel_projectUser['name'];
     $artical1 = "";
     $artical1 = "<html><head><style>.body{font-family:Arial, Helvetica, sans-serif; font-size:12px; }</style></head>";
     $artical1 .= "<body><strong>Hello " . $userName . ", </strong><br />";
     $artical1 .= "<br />";
     $artical1 .= "Your project <b>'" . $sel_projectBasic['projectTitle'] . "' </b>is accepted now.<br />";
     $artical1 .= "Project will be ended after: " . $daysEnd . " days<br />";
     $artical1 .= "<br /><br />Kind Regards,<br />" . DISPLAYSITENAME . " Team</body></html>";
     $subject1 = "Your project '" . unsanitize_string(ucfirst($sel_projectBasic['projectTitle'])) . "' is accepted";
     $mailbody1 = $artical1;
     $headers1 = "MIME-Version: 1.0\r\n";
     $headers1 .= "Content-type: text/html\r\n";
     $headers1 .= FROMEMAILADDRESS;
     @mail($userEmail, $subject1, $mailbody1, $headers1);
     //@mail('*****@*****.**', $subject1, $mailbody1, $headers1);
 }
 $currTime = time();
 if ($sel_projectBasic['projectEnd'] < $currTime && !isset($_GET['endDays'])) {
     redirect(SITE_ADM . "project_accept.php");
 }
 if ($sel_project['accepted'] == 1) {
     $con->update("UPDATE projects SET accepted=0 WHERE projectId = '" . $projectId . "'");
     redirect(SITE_ADM . "project_accept.php");
 } else {
                                    ?>
">
								<?php 
                                }
                                ?>
							</a>
							<div class="right_comment">
								<a title="<?php 
                                print $sel_4_data['projectTitle'];
                                ?>
" href="<?php 
                                echo SITE_URL . '/browseproject/' . $news_array1[$i]['projectId'] . '/' . Slug($sel_4_data['projectTitle']) . '/';
                                ?>
">
									<?php 
                                $unsanaprotit = unsanitize_string(ucfirst($sel_4_data['projectTitle']));
                                $protit_len = strlen($unsanaprotit);
                                if ($sel_4_data['projectTitle'] != '') {
                                    if ($protit_len > 20) {
                                        echo substr($unsanaprotit, 0, 20) . '...';
                                    } else {
                                        echo substr($unsanaprotit, 0, 20);
                                    }
                                } else {
                                    echo "Untitled";
                                }
                                ?>
								</a><div class="clear"></div>
								<span class="Launched_project">Commented On A Project Update</span>
								<div class="clear"></div>
							</div>
Exemple #26
0
                                    <div class="project-pledged-empty"></div>
                                <?php 
                        }
                        ?>
                            
                            <?php 
                    } else {
                        ?>
                                <div class="project-pledged-empty"></div>
                            <?php 
                    }
                    ?>
                            
                          <div class="spaser-small"></div>
						  <div class="spaser1 display_descraption"><?php 
                    print unsanitize_string(ucfirst($sel_project2['shortBlurb']));
                    ?>
</div>
						  <div></div>
						  <div class="spaser-small"></div>
						  <div class="gray-line"></div>
                          <?php 
                    $fundingAmount = (isset($sel_project2['fundingGoal']) or !empty($sel_project2['fundingGoal'])) ? $sel_project2['fundingGoal'] : 0;
                    if ($fundingAmount != NULL && $fundingAmount > 0) {
                        $value = $sel_project2['rewardedAmount'];
                        $max = $sel_project2['fundingGoal'];
                    }
                    $scale = 1.0;
                    if (!empty($max) && $max != 0) {
                        $percent = $value * 100 / $max;
                    } else {
            $sel_project_backer_user = mysql_fetch_assoc($con->recordselect("SELECT * FROM users WHERE userId='" . $sel_project_backers['userId'] . "'"));
            if ($sel_project_backer_user['updatesNotifyBackedProject'] == 1) {
                $artical = "";
                //tableborder { border: 1px solid #CCCCCC; }
                $artical = "<html><head><style>.body{font-family:Arial, Helvetica, sans-serif; font-size:12px; }\n\t\t\t.mtext {font-family: Arial, Helvetica, sans-serif;font-size: 12px;color: #333333;text-decoration: none;}\n\t\t\ta { font-family: Arial, Helvetica, sans-serif;font-size: 12px;color: #A11B1B;font-weight: normal;text-decoration: underline;}\n\t\t\ta:hover {font-family: Arial, Helvetica, sans-serif;font-size: 12px;font-weight: normal;color: #A11B1B;text-decoration: none;}\n\t\t\t</style></head>";
                $artical .= "<body><strong>Hello " . $sel_project_backer_user['name'] . ", </strong><br />";
                $artical .= "<br /><table width='100%' cellspacing='0' cellpadding='0' class='tableborder' align='left'>";
                /*$artical.="<tr><td height='80' style='border-bottom:solid 1px #f2f2f2; padding:5px; background-color: #999999;' valign='middle'><img src='".SITE_IMG."logo_fundraiser.png' /></td>
                		</tr>";*/
                $artical .= "<tr><td colspan='2'>Updates on <b>" . $sel_project_name['projectTitle'] . " Edited: </b> " . "</td></tr>";
                $artical .= "<tr><td colspan='2'>Update #" . $num_of_rows . " " . unsanitize_string($_POST['updateTitle']) . "</td></tr>";
                $artical .= "<tr><td colspan='2'>" . $textcontent . "</td></tr>";
                $artical .= "<tr><td colspan='2'>&nbsp;</td></tr>";
                $artical .= "<tr><td colspan='2'>&nbsp;</td></tr></table><br />";
                $artical .= "Kind Regards, <br />" . DISPLAYSITENAME . " Admin</body></html>";
                $subject = "Updates on " . SlugMailSubject(unsanitize_string($sel_project_name['projectTitle'])) . " Edited";
                $mailbody = $artical;
                $headers = "MIME-Version: 1.0\r\n";
                $headers .= "Content-type: text/html\r\n";
                $headers .= FROMEMAILADDRESS;
                @mail(base64_decode($sel_project_backer_user['emailAddress']), $subject, $mailbody, $headers);
            }
        }
        $_SESSION['msgType'] = array('from' => 'user', 'type' => 'error', 'var' => "multiple", 'val' => "Update Edited Successfully");
        redirect(SITE_URL . "browseproject/" . $sel_project_id['projectId'] . "/" . Slug($sel_project_name['projectTitle']) . "/&update=" . $num_of_rows . "#b");
    }
}
$module = 'user';
$page = 'projectupdate';
$content = $module . '/' . $page;
require_once DIR_TMP . "main_page.tpl.php";
            }
        }
        ?>
                        <h6><?php 
        echo date('M d', $sel_backedproject1['backingTime']);
        ?>
</h6>
                        <div class="clear"></div>
                    </div>
                    <div class="short_blurb">
                        <h5><?php 
        //echo unsanitize_string(ucfirst($sel_backproject['projectTitle']));
        ?>
</h5>
                        <p><?php 
        echo unsanitize_string($sel_backproject['shortBlurb']);
        ?>
</p>
                    </div>
                    <div class="backed_ammount">
                        <h4><?php 
        echo '$' . $sel_backedproject1['pledgeAmount'];
        ?>
</h4>
                    </div>
                    <div class="clear"></div>
                </div>
			<?php 
    }
    ?>
                 
                                                <div class="project-pledged-empty"></div>
                                            <?php 
                }
                ?>
                                    	
                                    <?php 
            } else {
                ?>
                            			<div class="project-pledged-empty"></div>
                            		<?php 
            }
            ?>
                            <div class="spaser-small"></div>
                            
                            <div class="spaser1 display_descraption"><?php 
            echo unsanitize_string(ucfirst($sel_project['shortBlurb']));
            ?>
</div>
                                                        
                            <div class="spaser-small"></div>
                            <div class="gray-line"></div>
                            <?php 
            $fundingAmount = (isset($sel_project['fundingGoal']) or !empty($sel_project['fundingGoal'])) ? $sel_project['fundingGoal'] : 0;
            if ($fundingAmount != NULL && $fundingAmount > 0) {
                $value = $sel_project['rewardedAmount'];
                $max = $sel_project['fundingGoal'];
            }
            $scale = 1.0;
            if (!empty($max) && $max != 0) {
                $percent = $value * 100 / $max;
            } else {
    $projectBacking = $con->insert("INSERT INTO projectbacking (rewardId, projectId, userId, pledgeAmount, backingTime, paypalId)\n\t\t\t\t\tVALUES('" . $rewardId . "','" . $projectId . "', " . $_SESSION['userId'] . ", '" . $amount . "', " . time() . "," . $paypalId . ");");
    // jwg - also bump contributor count if first time contributing to this project
    $bumpcontributor = '';
    $backedbefore = $this->con->recordselect("SELECT * FROM projectbacking WHERE userId='{$userId}' and projectId='{$projectId}'");
    if (mysql_num_rows($backedbefore) <= 0) {
        $bumpcontributor = ', rewardedContributor = rewardedContributor + 1';
    }
    //$updateProjectGoal = $con->update("UPDATE projectbasics set rewardedAmount = rewardedAmount +".$amount." where projectId =".$projectId. " LIMIT 1");
    $updateProjectGoal = $con->update("UPDATE projectbasics set rewardedAmount = rewardedAmount +" . $amount . "{$bumpcontributor} where projectId =" . $projectId . " LIMIT 1");
    $projectCreater = mysql_fetch_array($con->recordselect("SELECT * FROM projects as pro, users as usr, projectbasics as pb where pro.projectId=" . $projectId . " and pro.userId=usr.userId AND pb.projectId =" . $projectId));
    if ($projectCreater['pledgeMail'] == 1) {
        $artical1 = "";
        $artical1 = "<html><head><style>.body{font-family:Arial, Helvetica, sans-serif; font-size:12px; }</style></head>";
        $artical1 .= "<body><strong>Hello " . $projectCreater['name'] . ", </strong><br />";
        $artical1 .= "<br />";
        $artical1 .= $_SESSION['name'] . " has pledged on your project <b>" . $projectCreater['projectTitle'] . "</b><br />";
        $artical1 .= "Amount: \$" . $amount . "<br />";
        $artical1 .= "Please visit pledged project by clicking on following link.<br />\n\t\t\t<a href='" . $base_url . "browseproject/" . $projectId . "/" . Slug($projectCreater['projectTitle']) . '/' . "' target='_blank'>Click Here</a><br />";
        $artical1 .= "<br /><br />Kind Regards,<br />" . DISPLAYSITENAME . " Team</body></html>";
        $subject1 = "Pledge on " . unsanitize_string(ucfirst($projectCreater['projectTitle']));
        $mailbody1 = $artical1;
        $headers1 = "MIME-Version: 1.0\r\n";
        $headers1 .= "Content-type: text/html\r\n";
        $headers1 .= FROMEMAILADDRESS;
        @mail(base64_decode($projectCreater['emailAddress']), $subject1, $mailbody1, $headers1);
    }
    /*$inserTransaction = $con->insert("INSERT INO paypaltransaction(correlationId,amount,transactionId,userId)
    		VALUES ('".$resArray['CORRELATIONID']."', ".$amount.", '".$resArray['TRANSACTIONID']."', ".$_SESSION['uid'].")");*/
    $_SESSION['msgType'] = array('from' => 'user', 'type' => 'error', 'var' => "multiple", 'val' => "Thank you for backing the project");
    redirect($base_url . "browseproject/" . $projectId . "/" . Slug($projectCreater['projectTitle']) . '/');
}