本文整理匯總了PHP中rating::set_id_kriteria_rating方法的典型用法代碼示例。如果您正苦於以下問題:PHP rating::set_id_kriteria_rating方法的具體用法?PHP rating::set_id_kriteria_rating怎麽用?PHP rating::set_id_kriteria_rating使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類rating
的用法示例。
在下文中一共展示了rating::set_id_kriteria_rating方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: rating
include "../../CLASS/rating.class.php";
session_start();
if (empty($_SESSION['username']) and empty($_SESSION['passuser'])) {
echo '<link href="style/bootstrap.css" rel="stylesheet">';
echo "<link href='style/style.css' rel='stylesheet'>";
echo "</head><body><div class='admin-form'><div class='hero-unit'>\n <div align='center'>\n <h2>ANDA TIDAK MENDAPATKAN AKSES</h2>\n <img src='img/lock.png' class='offset'>\n <p>Untuk mengakses aplikasi, Anda harus login terlebih dahulu</p>\n <p><a class='btn btn-primary btn-large' href='admin-login.php'>Ulangi Lagi</a></p></div>\n </div></div>";
} else {
if ($_SESSION['leveluser'] == 'admin') {
$id = $_POST['id'];
$mode = $_POST['mode'];
$id_user_rating = $_POST['id_user_rating'];
$id_kriteria_rating = $_POST['id_kriteria_rating'];
$id_variabel_rating = $_POST['id_variabel_rating'];
$db = new rating();
$db->set_id_user_rating(preg_replace('/\\s+/', '', $id_user_rating));
$db->set_id_kriteria_rating(preg_replace('/\\s+/', '', $id_kriteria_rating));
$db->set_id_variabel_rating(preg_replace('/\\s+/', '', $id_variabel_rating));
if ($mode == "modeADD") {
$ada = $db->cek_data_rating($id_user_rating, $id_kriteria_rating);
if ($ada == 1) {
echo 3;
} else {
$ret = $db->simpan_data_rating();
echo $ret;
}
} else {
if ($mode == "modeEDIT") {
$ret = $db->edit_data_rating($id);
echo $ret;
}
}