<?php if (isset($_REQUEST['action'])) { if ($_REQUEST['action'] == 'active') { query("UPDATE tbl_video SET video_status='inactive' WHERE video_id='" . $_REQUEST['video_id'] . "'"); } if ($_REQUEST['action'] == 'inactive') { query("UPDATE tbl_video SET video_status='active' WHERE video_id='" . $_REQUEST['video_id'] . "'"); } if ($_REQUEST['action'] == 'delete') { query_delete('tbl_video', "video_id='" . $_REQUEST['video_id'] . "'"); echo "<script language='javascript'> window.location='video.php'; </script>"; exit; } } $sql = query("SELECT * FROM tbl_video ORDER BY video_id DESC"); $count = query_rows($sql);
<?php if (isset($_REQUEST['action'])) { if ($_REQUEST['action'] == 'delete') { query_delete('news', "news_id='" . $_REQUEST['news_id'] . "'"); echo "<script language='javascript'> window.location='news.php'; </script>"; exit; } } $sqlnews = mysql_query("SELECT * FROM news ORDER BY news_id ASC"); $count = mysql_num_rows($sqlnews);
public static function deleteByMeasureId($measure_id) { # Deletes all entries for the given measure # Used when deleting the measure from catalof # Or when resetting ranges (from test_type_edit.php) $saved_db = DbUtil::switchToGlobal(); $query_string = "DELETE FROM reference_range_global WHERE measure_id={$measure_id}"; query_delete($query_string); DbUtil::switchRestore($saved_db); }
<?php if (isset($_REQUEST['action'])) { if ($_REQUEST['action'] == 'delete') { query_delete('events', "event_id='" . $_REQUEST['event_id'] . "'"); echo "<script language='javascript'> window.location='event.php'; </script>"; exit; } } $sql = mysql_query("SELECT * FROM events ORDER BY event_id ASC"); $count = mysql_num_rows($sql); $comsql = mysql_query("SELECT * FROM committee ORDER BY com_id ASC"); $count1 = mysql_num_rows($comsql);
<?php include "../includes/db_lib.php"; $userId = $_SESSION['user_id']; $testName = $_REQUEST['testName']; $labIdTestId = $_REQUEST['labIdTestId']; $tid = $_REQUEST['country_test_id']; $saved_db = DbUtil::switchToGlobal(); $queryString = "DELETE FROM test_mapping WHERE test_id = {$tid} AND user_id = {$userId}"; $record = query_delete($queryString); /*$queryString = "SELECT MAX(test_id) AS test_id FROM test_mapping ". "WHERE user_id=$userId"; $record = query_associative_one($queryString); $testId = intval($record['test_id']) + 1; */ $queryString = "INSERT INTO TEST_MAPPING (user_id, test_name, lab_id_test_id, test_id) " . "VALUES (" . $userId . ",'" . $testName . "','" . $labIdTestId . "'," . $tid . ")"; query_insert_one($queryString) or die(mysql_error()); DbUtil::switchRestore($saved_db); echo "true";
?> <?php $name = time() . $_FILES["uploadfile"]["name"]; move_uploaded_file($_FILES["uploadfile"]["tmp_name"], "../uploads/product/" . $name); $_SESSION['temp_image'][] = $name; } if ($_REQUEST['type'] == 'deleteuploadimage') { ?> <?php $image = $_REQUEST['image']; $key = array_search($image, $_SESSION['temp_image']); if ($key !== false) { unset($_SESSION['temp_image'][$key]); } @unlink('../uploads/product/' . $image); } if ($_REQUEST['type'] == 'uploadimageedit') { ?> <?php $product_id = $_GET['product_id']; $name = time() . $_FILES["uploadfile"]["name"]; move_uploaded_file($_FILES["uploadfile"]["tmp_name"], "../uploads/product/" . $name); $data2['productimage_product_id'] = $product_id; $data2['productimage_name'] = $name; query_insert('tbl_product_image', $data2); } if ($_REQUEST['type'] == 'removeeditad') { $photopath = $_REQUEST['photopath']; query_delete('tbl_product_image', "productimage_id='" . $_REQUEST['photoid'] . "'"); @unlink('../uploads/product/' . $photopath); }
<?php if (isset($_REQUEST['action'])) { if ($_REQUEST['action'] == 'delete') { query_delete('smsg', "msgid='" . $_REQUEST['msgid'] . "'"); echo "<script language='javascript'> window.location='smsgview.php'; </script>"; exit; } } $msg = mysql_query("SELECT * FROM smsg ORDER BY msgid ASC"); $count = mysql_num_rows($msg);
} # For each measure: foreach ($measure_list as $measure) { $measure_id = $measure->measureId; # Remove entries from test_type_measure $query_string = "DELETE FROM test_type_measure WHERE measure_id={$measure_id}"; query_delete($query_string); # Remove entry from measure $query_string = "DELETE FROM measure WHERE measure_id={$measure_id}"; query_delete($query_string); } $query_string = "SELECT * FROM specimen_type"; $resultset = query_associative_all($query_string, $row_count); $specimen_list = array(); foreach ($resultset as $record) { $specimen_list[] = TestType::getObject($record); } # For each specimen type: foreach ($specimen_list as $specimen) { $specimen_type_id = $specimen->specimenTypeId; # Remove entries from lab_config_specimen_type $query_string = "DELETE FROM lab_config_specimen_type WHERE specimen_type_id={$specimen_type_id}"; query_delete($query_string); # Remove entries from specimen_test $query_string = "DELETE FROM specimen_test WHERE specimen_type_id={$specimen_type_id}"; query_delete($query_string); # Remove entry from specimen_type $query_string = "DELETE FROM specimen_type WHERE specimen_type_id={$specimen_type_id}"; query_delete($query_string); } DbUtil::switchRestore($saved_db);
<?php if (isset($_REQUEST['action'])) { if ($_REQUEST['action'] == 'delete') { query_delete('user', "user_id='" . $_REQUEST['user_id'] . "'"); echo "<script language='javascript'> window.location='shop.php'; </script>"; exit; } } $sql = mysql_query("SELECT * FROM events ORDER BY event_id DESC LIMIT 1"); $count = mysql_num_rows($sql);
<?php if (isset($_REQUEST['action'])) { if ($_REQUEST['action'] == 'delete') { query_delete('about', "id='" . $_REQUEST['id'] . "'"); echo "<script language='javascript'> window.location='contact.php'; </script>"; exit; } } $contactsql = mysql_query("SELECT * FROM about ORDER BY id ASC"); $count = mysql_num_rows($contactsql);
<?php if (isset($_REQUEST['action'])) { if ($_REQUEST['action'] == 'delete') { query_delete('faculty', "id='" . $_REQUEST['id'] . "'"); echo "<script language='javascript'> window.location='faculty.php'; </script>"; exit; } } $facultysql = mysql_query("SELECT * FROM faculty ORDER BY id ASC"); $count = mysql_num_rows($facultysql);