本文整理汇总了PHP中delete_db函数的典型用法代码示例。如果您正苦于以下问题:PHP delete_db函数的具体用法?PHP delete_db怎么用?PHP delete_db使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了delete_db函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: update_db
" value="Terminer"/>
<?php
if (request_confirm('Second_Edit')) {
?>
<input type="submit" name="Second_Delete" value="Supprimer"><?php
}
?>
</form>
<?php
}
if (request_confirm('End_Edit')) {
if (valid_post_db('Caranille_Building')) {
update_db('Caranille_Building', addslashes_r($_POST));
$message = 'Batiment mis à jour';
} else {
$message = 'Tous les champs n\'ont pas été remplis';
}
}
if (request_confirm('Delete')) {
delete_db('Caranille_Building', $_POST);
$message = 'Le Batiment a bien été supprimée';
}
if (request_confirm('End_Add')) {
if (valid_post_db('Caranille_Building')) {
insert_db('Caranille_Building', addslashes_r($_POST));
$message = 'Batiment ajouté';
} else {
$message = 'Tous les champs n\'ont pas été remplis';
}
}
}
示例2: file_get_contents_curl
include 'find_time2.php';
include 'db.php';
//특정 url 내용 얻어오는 함수
function file_get_contents_curl($url)
{
$ch = curl_init();
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
//Set curl to return the data instead of printing it to the browser.
curl_setopt($ch, CURLOPT_URL, $url);
$contents = curl_exec($ch);
curl_close($ch);
return $contents;
}
//db내용지우기
delete_db();
//지역별 인터파크 공연리스트 가져오기
$url_array = array("http://ticket.interpark.com/TiKi/Special/TPRegionReserve.asp?Region=42001&RegionName=%BC%AD%BF%EF", "http://ticket.interpark.com/TiKi/Special/TPRegionReserve.asp?Region=42010&RegionName=%B0%E6%B1%E2", "http://ticket.interpark.com/TiKi/Special/TPRegionReserve.asp?Region=42011&RegionName=%C0%CE%C3%B5", "http://ticket.interpark.com/TiKi/Special/TPRegionReserve.asp?Region=42080&RegionName=%B0%AD%BF%F8", "http://ticket.interpark.com/TiKi/Special/TPRegionReserve.asp?Region=42070&RegionName=%C3%E6%BA%CF", "http://ticket.interpark.com/TiKi/Special/TPRegionReserve.asp?Region=42060&RegionName=%C3%E6%B3%B2", "http://ticket.interpark.com/TiKi/Special/TPRegionReserve.asp?Region=42061&RegionName=%B4%EB%C0%FC", "http://ticket.interpark.com/TiKi/Special/TPRegionReserve.asp?Region=42030&RegionName=%B0%E6%BA%CF", "http://ticket.interpark.com/TiKi/Special/TPRegionReserve.asp?Region=42020&RegionName=%B0%E6%B3%B2", "http://ticket.interpark.com/TiKi/Special/TPRegionReserve.asp?Region=42031&RegionName=%B4%EB%B1%B8", "http://ticket.interpark.com/TiKi/Special/TPRegionReserve.asp?Region=42091&RegionName=%BF%EF%BB%EA", "http://ticket.interpark.com/TiKi/Special/TPRegionReserve.asp?Region=42021&RegionName=%BA%CE%BB%EA", "http://ticket.interpark.com/TiKi/Special/TPRegionReserve.asp?Region=42050&RegionName=%C0%FC%BA%CF", "http://ticket.interpark.com/TiKi/Special/TPRegionReserve.asp?Region=42040&RegionName=%C0%FC%B3%B2", "http://ticket.interpark.com/TiKi/Special/TPRegionReserve.asp?Region=42041&RegionName=%B1%A4%C1%D6", "http://ticket.interpark.com/TiKi/Special/TPRegionReserve.asp?Region=42090&RegionName=%C1%A6%C1%D6");
foreach ($url_array as $url) {
//지역별 공연의 코드번호 가져오기
// url 받아오기
$play_list = file_get_contents_curl($url);
$play_list = mb_convert_encoding($play_list, 'utf-8', 'euc-kr');
$index = strpos($play_list, 'top_line');
$play_list = substr($play_list, $index);
$index = strpos($play_list, 'btn_genre_exhibit');
//공연목록중 전시는 제외
$play_list = substr($play_list, 0, $index);
$index = strpos($play_list, 'http://ticket.interpark.com/TIKI/Main/TikiGoodsInfo.asp?GoodsCode=');
$play_list = substr($play_list, $index);
$play_array = explode("Line", $play_list);
示例3: load_css
<?php
// l'utilisateur peut ajouter un titre pour chaque module different de Caranille -Accueil
$title = "Historique";
$baseline = "vos actes passés";
load_css('corps.css', 'corps');
if (request_confirm('edit-role-play')) {
if (verifier_token(600, get_link('diary', 'game'), "editor-role-play-" . request_post('Diary_ID'))) {
update_db('Caranille_Diaries', array('Diary_Description' => request_post('roleplay'), 'Diary_ID' => request_post('Diary_ID')));
}
}
if (request_confirm('remove-role-play')) {
if (verifier_token(600, get_link('diary', 'game'), "remover-role-play-" . request_post('Diary_ID'))) {
delete_db('Caranille_Diaries', array('Diary_ID' => request_post('Diary_ID')));
}
}
示例4: move_db
move_db('Caranille_Pages', $Page_ID, 'up');
header('location:' . get_link('pages', 'admin', array('Edit' => 'ok')));
$message = 'Chapitre remonté';
}
if (request_confirm('down_rank')) {
$Page_ID = request_data('Page_ID');
move_db('Caranille_Pages', $Page_ID, 'down');
header('location:' . get_link('pages', 'admin', array('Edit' => 'ok')));
$message = 'Chapitre descendu';
}
if (request_confirm('End_Edit')) {
if (valid_post_db('Caranille_Pages')) {
update_db('Caranille_Pages', addslashes_r($_POST));
$message = 'Chapitre mis à jour';
} else {
$message = 'Tous les champs n\'ont pas été remplis';
}
}
if (request_confirm('Delete')) {
delete_db(addslashes_r($_POST));
$message = 'Le page a bien été supprimée';
}
if (request_confirm('End_Add')) {
if (valid_post_db('Caranille_Pages')) {
insert_db('Caranille_Pages', addslashes_r($_POST));
$message = 'page ajouté';
} else {
$message = 'Tous les champs n\'ont pas été remplis';
}
}
}
示例5: Services_JSON
<?php
require_once '../../../include/Zend/JSON.php';
$json = new Services_JSON();
include "../../../include/class.mysqldb.php";
include "../../../include/config.inc.php";
include "../../../include/class.function.php";
foreach ($_REQUEST as $key => $value) {
${$key} = $value;
#echo $key ."=". $value."<br>";
}
$mobile_model_chk = select_db('mobilemodel', "where mobileModelId = '" . $id . "'");
$model_name = $mobile_model_chk[0]['mobileModelName'];
$mobile_model_chk2 = select_db('mobile', "where mobileModelId = '" . $id . "'");
$find_used = count($mobile_model_chk2);
if ($find_used == 0) {
$TableName = 'mobilemodel';
$sql = delete_db($TableName, array('mobileModelId=' => $id));
//echo $sql;
mysql_query($sql);
$data['success'] = true;
$data['message'] = 'ลบรุ่นมือถือ "' . $model_name . '" เรียบร้อยแล้ว';
} else {
$data['success'] = false;
$data['message'] = 'ลบรุ่นมือถือ "' . $model_name . '" ไม่ได้เนื่องจากมีข้อมูลมือถือรุ่นนี้ในระบบ';
}
echo $_GET['callback'] . '(' . $json->encode($data) . ')';
示例6: Services_JSON
<?php
require_once '../../../include/Zend/JSON.php';
$json = new Services_JSON();
include "../../../include/class.mysqldb.php";
include "../../../include/config.inc.php";
include "../../../include/class.function.php";
foreach ($_REQUEST as $key => $value) {
${$key} = $value;
#echo $key ."=". $value."<br>";
}
$find_used = 0;
$time_chk = select_db('timeschedule', "where timeScheduleId = '" . $id . "'");
$time_name = $time_chk[0]['scheduleName'];
//$time_chk2 = select_db('transportsection',"where timeScheduleId = '".$id."'");
//$find_used = count($time_chk2);
if ($find_used == 0) {
$TableName = 'timeschedule';
$sql = delete_db($TableName, array('timeScheduleId=' => $id));
//echo $sql;
mysql_query($sql);
$data['success'] = true;
$data['message'] = 'ลบช่วงเวลา "' . $time_name . '" เรียบร้อยแล้ว';
} else {
$data['success'] = false;
$data['message'] = 'ลบช่วงเวลา "' . $time_name . '" ไม่ได้เนื่องจากมีข้อมูลใช้งานอยู่ี้ในระบบ';
}
echo $_GET['callback'] . '(' . $json->encode($data) . ')';
示例7: foreach
<?php
if (verif_access("Admin")) {
if (request_confirm('style')) {
$p = $_POST['style'];
// On décale les tableaux d'un rang
foreach ($p as $id => $s) {
extract($s);
if ($id != 0 && request_confirm('modifier')) {
update_db('Caranille_Styles', array('Style_Code' => $Style_Code, 'Style_Commentaire' => $Style_Commentaire, 'Style_ID' => $id));
} elseif ($id != 0 && request_confirm('supr')) {
delete_db('Caranille_Styles', array('Style_ID' => $id));
} elseif ($id == 0 && request_confirm('rajout')) {
insert_db('Caranille_Styles', array('Style_Code' => $Style_Code, 'Style_Commentaire' => $Style_Commentaire));
}
}
// -------------------------------------------
// On écrit dans le fichier
// -------------------------------------------
$retour = list_db("list_t", array('table' => "Caranille_Styles"));
$fichier = fopen("{$_path}/Design/{$MMORPG_Template}/style.css", "w");
// On l'ouvre en mode « w »
$message = '';
if (!empty($retour)) {
foreach ($retour as $donnees) {
$message .= "\n\r";
// Retour à la ligne
$message .= "/** " . $donnees['Style_Commentaire'] . " **/";
// Retour à la ligne
$message .= "\n\r";
// Retour à la ligne
示例8: Services_JSON
<?php
require_once '../../../include/Zend/JSON.php';
$json = new Services_JSON();
include "../../../include/class.mysqldb.php";
include "../../../include/config.inc.php";
include "../../../include/class.function.php";
foreach ($_REQUEST as $key => $value) {
${$key} = $value;
#echo $key ."=". $value."<br>";
}
$promotion_chk = select_db('newspromotion', "where promotionId = '" . $id . "'");
$promotionTopic = $promotion_chk[0]['promotionTopic'];
$TableName = 'newspromotion';
$sql = delete_db($TableName, array('promotionId=' => $id));
//echo $sql;
$rs = mysql_query($sql);
if ($rs) {
$data['success'] = true;
$data['message'] = 'ลบโปรโมชั่น "' . $promotionTopic . '" เรียบร้อยแล้ว';
} else {
$data['success'] = false;
$data['message'] = 'ผิดพลาดในการลบโปรโมชั่น กรุณาลองอีกครั้ง';
}
echo $_GET['callback'] . '(' . $json->encode($data) . ')';
示例9: Services_JSON
<?php
require_once '../../../include/Zend/JSON.php';
$json = new Services_JSON();
include "../../../include/class.mysqldb.php";
include "../../../include/config.inc.php";
include "../../../include/class.function.php";
foreach ($_REQUEST as $key => $value) {
${$key} = $value;
#echo $key ."=". $value."<br>";
}
$time_data = select_db('transportsection', "where transportSectionId = '" . $id . "'");
$driverId = $time_data[0]['driverId'];
$driver_data = select_db('drivertaxi', "where driverId = '" . $driverId . "'");
$name = $driver_data[0]['firstName'] . ' ' . $driver_data[0]['lastName'];
$TableName = 'transportsection';
$sql = delete_db($TableName, array('transportSectionId=' => $id));
$rs = mysql_query($sql);
$TableName = 'car';
$data = array('carStatus' => 1, 'dateUpdate' => date('Y-m-d H:i:s'));
$sql = update_db($TableName, array('carId=' => $carId), $data);
$rs = mysql_query($sql);
if ($rs) {
$data['success'] = true;
$data['message'] = 'ยกเลิกคุณ "' . $name . '" จากการลงเวลางานเรียบร้อยแล้ว';
} else {
$data['success'] = false;
$data['message'] = 'ผิดพลาดในการยกเลิก กรุณาลองอีกครั้ง';
}
echo $_GET['callback'] . '(' . $json->encode($data) . ')';
示例10: foreach
include "../../../include/class.function.php";
foreach ($_REQUEST as $key => $value) {
${$key} = $value;
#echo $key ."=". $value."<br>";
}
//GET Banner
$car_banner_chk = select_db('carbanner', "where carBannerId = '" . $id . "'");
$banner_name = $car_banner_chk[0]['carBannerNameEng'];
//Table Car
$car_banner_chk2 = select_db('car', "where carBannerId = '" . $id . "'");
$find_car_used = count($car_banner_chk2);
//Table CarModel
$car_banner_chk3 = select_db('carmodel', "where carBannerId = '" . $id . "'");
$find_model_used = count($car_banner_chk3);
if ($find_car_used == 0 && $find_model_used == 0) {
$TableName = 'carbanner';
$sql = delete_db($TableName, array('carBannerId=' => $id));
//echo $sql;
mysql_query($sql);
$data['success'] = true;
$data['message'] = 'ลบยี่ห้อรถยนต์ "' . $banner_name . '" เรียบร้อยแล้ว';
} else {
$data['success'] = false;
if ($find_car_used != 0) {
$data['message'] = 'ลบยี่ห้อรถยนต์ "' . $banner_name . '" ไม่ได้เนื่องจากมีข้อมูลรถยี่ห้อนี้ในระบบ';
}
if ($find_model_used != 0) {
$data['message'] = 'ลบยี่ห้อรถยนต์ "' . $banner_name . '" ไม่ได้เนื่องจากมีข้อมูลรุ่นรถอยู่';
}
}
echo $_GET['callback'] . '(' . $json->encode($data) . ')';
示例11: Services_JSON
<?php
require_once '../../../include/Zend/JSON.php';
$json = new Services_JSON();
include "../../../include/class.mysqldb.php";
include "../../../include/config.inc.php";
include "../../../include/class.function.php";
foreach ($_REQUEST as $key => $value) {
${$key} = $value;
#echo $key ."=". $value."<br>";
}
$news_chk = select_db('news', "where newsId = '" . $id . "'");
$newsTopic = $news_chk[0]['newsTopic'];
$TableName = 'news';
$sql = delete_db($TableName, array('newsId=' => $id));
//echo $sql;
$rs = mysql_query($sql);
if ($rs) {
$data['success'] = true;
$data['message'] = 'ลบข่าว "' . $newsTopic . '" เรียบร้อยแล้ว';
} else {
$data['success'] = false;
$data['message'] = 'ผิดพลาดในการลบข่าวสาร กรุณาลองอีกครั้ง';
}
echo $_GET['callback'] . '(' . $json->encode($data) . ')';
示例12: fopen
if (!is_uploaded_file($dataFichier)) {
return 10;
}
$ft = fopen($dataFichier, "r");
$imgbinary = fread($ft, filesize($dataFichier));
$data = base64_encode($imgbinary);
insert_db('Caranille_Images', array('Image_Base64' => $data, 'Image_Name' => $nomUtilisateur, 'Image_Type' => $typeFichier));
//, 'Image_ID'=>$DocID));
}
return 0;
}
}
if (verif_access("Admin")) {
if (request_confirm('Delete')) {
$Image_ID = htmlspecialchars(addslashes($_POST['Image_ID']));
delete_db('Caranille_Images', array('Image_ID' => $Image_ID));
$message = 'Le Batiment a bien été supprimée';
}
if (request_confirm('End_Edit')) {
foreach ($_POST as $key => $value) {
$c = count_db("edit_admin", array('table' => 'Caranille_Configuration', 'ID' => 'Configuration_Name', 'value' => $key));
//"select * from where ='$' limit 1");
if ($c == 1) {
update_db('Caranille_Configuration', addslashes_r(array('Configuration_Name' => $key, 'Configuration_Value' => $value)));
} else {
insert_db('Caranille_Configuration', addslashes_r(array('Configuration_Name' => $key, 'Configuration_Value' => $value)));
}
}
}
if (request_confirm('End_Add')) {
if (valid_post_db('Caranille_Images')) {
示例13: update_db
" value="Terminer"/>
<?php
if (request_confirm('Second_Edit')) {
?>
<input type="submit" name="Second_Delete" value="Supprimer"><?php
}
?>
</form>
<?php
}
if (request_confirm('End_Edit')) {
if (valid_post_db('Caranille_Chapters')) {
update_db('Caranille_Chapters', addslashes_r($_POST));
$message = 'Chapitre mis à jour';
} else {
$message = 'Tous les champs n\'ont pas été remplis';
}
}
if (request_confirm('Delete')) {
delete_db('Caranille_Chapters', addslashes_r($_POST));
$message = 'Le chapitre a bien été supprimée';
}
if (request_confirm('End_Add')) {
if (valid_post_db('Caranille_Chapters')) {
insert_db('Caranille_Chapters', addslashes_r($_POST));
$message = 'chapitre ajouté';
} else {
$message = 'Tous les champs n\'ont pas été remplis';
}
}
}
示例14: update_db
?>
" value="Terminer"/>
<?php
if (request_confirm('Second_Edit')) {
?>
<input type="submit" name="Second_Delete" value="Supprimer"><?php
}
?>
</form>
<?php
}
if (request_confirm('End_Edit')) {
if (valid_post_db('Caranille_Fragments')) {
update_db('Caranille_Fragments', addslashes_r($_POST));
echo 'Fragment mis à jour';
} else {
echo 'Tous les champs n\'ont pas été remplis';
}
}
if (request_confirm('Delete')) {
delete_db('Caranille_Fragments', $_POST);
echo 'Le Fragment a bien été supprimé';
}
if (request_confirm('End_Add')) {
if (valid_post_db('Caranille_Fragments')) {
insert_db('Caranille_Fragments', addslashes_r($_POST));
} else {
echo 'Tous les champs n\'ont pas été remplis';
}
}
}
示例15: extract
<?php
//$title =""; // l'utilisateur peut ajouter un titre pour chaque module different de Caranille -Accueil
//$baseline= ""
if (request_confirm('Delete')) {
if (verifier_token(600, get_link('Delete_Account', 'User'), 'Delete_Account-step-2')) {
extract(addslashes_r($_POST));
$Delete_List = get_db('request_account', $_POST);
if (!empty($Delete_List)) {
if ($Password === password_decode($prefixe_salt . $Delete_List['Account_Salt'] . $suffixe_salt, $Delete_List['Account_Password'])) {
delete_db('Caranille_Accounts', $Delete_List);
echo 'Votre compte ainsi que toute vos données personnelles ont été définitivement supprimée';
} else {
echo 'Mauvaise combinaison Pseudo/Mot de Passe';
}
} else {
echo 'compte inconnu';
}
}
}