File manager - Edit - /home/autoph/public_html/portal/includes/lab/lab_menu_911.php
Back
<?php $id=$_GET['id']; if(isset($_POST['saveComment'])){ $txtComment = $_POST['commentBox']; $id = $_POST['id']; $rateCount = $_POST['rateCount']; $txtComment = mysql_real_escape_string($txtComment); $oldScore = mysql_result(mysql_query("SELECT `scores` FROM `talents_profile` WHERE `id`='$id'"),0); $Count = mysql_result(mysql_query("SELECT COUNT(`id`) FROM `tb_comments` WHERE `talent_id`='$id'"),0); $commentCount = $Count + 1; $commentSUM = mysql_result(mysql_query("SELECT SUM(`rate`) FROM `tb_comments` WHERE `talent_id`='$id'"),0); $newScore = ($commentSUM + $rateCount) / $commentCount ; mysql_query("UPDATE `talents_profile` SET `scores`='$newScore' WHERE `id`='$id'"); $sql="INSERT INTO `tb_comments` (`id`,`talent_id`,`rate`,`date`,`time`,`from`,`comments`) VALUES('','$id','$rateCount','$toDate','$currentTime','$user','$txtComment')"; if(!mysql_query($sql)){ die('Error: ' . mysql_error()); }else{ echo "<div class='ContinueMSG' style='width:250px;height:150px;top:100px;left:150px;z-index:999999999'>"; echo " <h3 class='lightGradient' style='width:98%;font-family:Calibri Light;font-size:18px;font-weight:bold;padding-left:5px;padding-top:5px;'>NEW RECORD SAVED...</h3>"; echo "<div style='top:3px;left:95.5%;position:absolute;z-index:3;background:transparent'> <a href='main_new.php?view=100&sview=911&sid=UR&search=&view=plist&id=".$_GET['id']."&tab=0#id-0' > <center>X</center> </a> </div>"; echo "<center><br><br>New Record Saved. <br><br> <a href='main_new.php?view=100&sview=911&sid=UR&search=&view=plist&id=".$_GET['id']."&tab=0#id-0' > <input type='button' name='close' value='Close' style='width:80px;border-radius:5px;height:30px;'></a> </center></div>"; } } if(isset($_GET['comment'])){ if($_GET['comment']==='true'){ echo "<div class='ContinueMSG' style='position:absolute;top:200px;left:250px'>"; echo " <h3 class='lightGradient' style='width:99%;font-family:Calibri Light;font-size:12px;font-weight:bold;padding-left:5px;padding-top:3px;'>ADD NEW COMMENT</h3>"; echo "<div style='top:3px;left:97.5%;position:absolute;z-index:3;background:transparent'> <a href='main_new.php?view=100&sview=911&sid=UR&search=&view=plist&id=".$_GET['id']."&tab=0#id-0' > <center>X</center> </a> </div>"; echo "<form action='' method='POST' style='padding:3px'>"; echo "<input type='hidden' name='id' value='".$_GET['id']."'>"; echo "<textarea required rows='3'name='commentBox' style='width:100%;font-family:Calibri Light;color:blue;size:10p;margin-bottom:5px;background:white;border:1px solid gray'></textarea>"; echo "RATINGS: <input type='number' name='rateCount' value='5' max='10' min='0' style='width:50px;font-size:16px;color:blue'> Max of 10 Ratings"; echo "<br><br><center><input type='submit' name='saveComment' value='Save Record' style='width:80px;height:30px;border-radius:5px'></center>"; echo "</form>"; echo "</div>"; } } ?> <table style='width:100%;border-collapse:collapse'> <tr> <td class="titleBlue" style="padding-left:5px;border:1px solid lightgray;height:22px;font-size:14px;font-weight:bold;color:black;border-right:1px solid #f2f2f2"> COMMENTS / NOTES </td> </tr> </table> <div class='gradBlue2' STYLE='padding-top:0px;height:450px; width: 280px; overflow:auto;font-size: 12px; border:1px solid white;'> <?php echo "<h3 style='padding:2px;background:#f4f4f4'> <a href='main_new.php?comment=true&view=100&sview=911&sid=UR&search=&view=plist&id=".$_GET['id']."&tab=0#id-0' style='font-family:Calibri;font-size:12px;font-weight:normal;color:black'> <ABBR title='New Comment'><img src='./images/new_a.png' onmouseover=\"this.src='images/new_b.png';\" onmouseout=\"this.src='images/new_a.png';\" width='25px'/></ABBR> </a> <a href='printcomment.php?id=".$_GET['id']."' style='font-family:Calibri;font-size:12px;font-weight:normal;color:black'> <ABBR title='Print'><img src='./images/print_a.png' onmouseover=\"this.src='images/print_b.png';\" onmouseout=\"this.src='images/print_a.png';\" width='25px'/></ABBR> </a> <a href='main_new.php?view=100&sview=911&sid=UR&search=&view=plist&id=".$_GET['id']."&mail=true&tab=0#id-0' style='font-family:Calibri;font-size:12px;font-weight:normal;color:black'> <ABBR title='Send to E-mail'><img src='./images/sendmail_a.png' onmouseover=\"this.src='images/sendmail_b.png';\" onmouseout=\"this.src='images/sendmail_a.png';\" width='25px'/></ABBR> </a> </h3>"; $qq = mysql_query("SELECT * from `tb_comments` WHERE `status`='1' AND `talent_id`='$id' ORDER BY `date` DESC"); while($row=mysql_fetch_array($qq)){ echo "<center><div style='margin-top:5px;border:1px solid #fbaf6f ;text-align:left; width:88%;margin-bottom:5px;background:#f8fab0;padding:5px;font-family:Calibri Light;color:black;size:12px;'>".$row['comments']." <b style='font-size:11px;color:blue;font-weight:normal'><br>Points Earned: ".$row['rate']." Points </b> <br><i style='font-size:11px;color:gray'>Date:".$row['date']." | ".$row['time']."</i><br> Posted By: ".$row['from']."</div>"; } ?> </div>
| ver. 1.4 |
.
| PHP 7.3.33 | Generation time: 0.03 |
proxy
|
phpinfo
|
Settings