コード例 #1
0
ファイル: like_unlike.php プロジェクト: jesus143/fs-dev
<?php

session_start();
require "../../connect.php";
require "../../function.php";
require "../../library.php";
require "../../source.php";
require "../../myclass.php";
$mc = new myclass();
// echo "you like this comment";
like_dislike();
// function like_dislikes(){
// 	if (!empty($_SESSION['mno'])) {
// 		if (empty($_GET['unlike'])) {
// 			$total_like=select('posted_looks_comments_like_dislike',3,array('plcno',$_GET['id']));
// 			if (!select_w_2('posted_looks_comments_like_dislike',1,array('plcno',$_GET['id'],'mno',$_SESSION['mno']),'and') ) {
// 				insert('posted_looks_comments_like_dislike',array('plcno','mno'),array($_GET['id'],$_SESSION['mno']),'plcldno');
// 				count_total_like($total_like);
// 				// echo "Sucesfully like the comment ";
// 			}else{
// 				count_total_like($total_like);
// 			}
// 		}else{
// 			delete_w_2('posted_looks_comments_like_dislike',array('plcno',$_GET['unlike'],'mno',$_SESSION['mno']),'and');
// 			 // echo "Sucesfully unlike the comment";
// 			$total_like=select('posted_looks_comments_like_dislike',3,array('plcno',$_GET['unlike']));
// 			count_total_like($total_like);
// 		}
// 	}
// }
コード例 #2
0
function judge_alert($round, $bid, $tid, $location, $likes, $dislikes, $table_styles, $id)
{
    if (table_round($tid, $round)) {
        $unavailable = unavailable($bid, $location, $round, $tid);
        $entry_conflict = entry_conflict($bid, $table_styles);
        $at_table = at_table($bid, $tid);
        if ($unavailable) {
            $r = "bg-purple text-purple|<span class=\"fa fa-check\"></span> <strong>Assigned.</strong> Paricipant is assigned to another table in this round.";
        }
        if ($entry_conflict) {
            $r = "bg-info text-info|<span class=\"fa fa-ban\"></span> <strong>Disabled.</strong> Participant has an entry at this table.";
        }
        if (!$unavailable && !$entry_conflict) {
            $r = like_dislike($likes, $dislikes, $table_styles);
        }
    } else {
        $r = '';
    }
    return $r;
}
コード例 #3
-1
 function judge_alert($round, $bid, $tid, $location, $likes, $dislikes, $table_styles, $id)
 {
     if (table_round($tid, $round)) {
         $unavailable = unavailable($bid, $location, $round, $tid);
         $entry_conflict = entry_conflict($bid, $table_styles);
         $at_table = at_table($bid, $tid);
         //if (strpos($at_table,$tid) !== false) $already = TRUE;
         if ($unavailable) {
             $r = '<div class="orange judge-alert">Already Assigned to This Round</div>';
         }
         //if ($already) $r = '<div class="purple judge-alert">Already Assigned to this Table</div>';
         if ($entry_conflict) {
             $r = '<div class="blue judge-alert">Disabled - Participant has an Entry at this Table</div>';
         }
         if (!$unavailable && !$entry_conflict) {
             $r = like_dislike($likes, $dislikes, $table_styles);
         }
     } else {
         $r = '';
     }
     return $r;
 }