function delete_folder($DB_GEGEVENS, $UPLOAD_FOLDER, $id) { $db = new DB($DB_GEGEVENS); $result = $db->query("SELECT id FROM photo WHERE folderid = " . $id); while ($row = mysql_fetch_array($result)) { delete_photo($DB_GEGEVENS, $UPLOAD_FOLDER, $row['id']); } unset($db); $db = new DB($DB_GEGEVENS); $db->query("DELETE FROM folder WHERE id = " . $id); unset($db); }
if ($result["ERRCODE"] == 1400) { $picErrmsg = "Your image link is invalid."; } else { echo "Uh oh, unrecognized error code: "; echo $result['ERRCODE']; } } } else { /* Commit to database */ OCICommit($db_conn); } } else { if (array_key_exists('deleteUserImage', $_POST)) { // not complete TODO $imageindex = $_POST['imgindex']; delete_photo($user_userid, $imageindex); $imageindex = $_POST['imgindex'] - 1; OCICommit($db_conn); } } } /* Commit to save changes... */ OCICommit($db_conn); } else { /* if ($db_conn) */ echo "cannot connect"; $e = OCI_Error(); /* For OCILogon errors pass no handle */ echo htmlentities($e['message']); } ?>
<?php $message = ''; $id = intval($_GET['id']); $name = trim($_GET['name']); //we use $_GET because data input came from the URL if (isset($_GET['id'])) { $id = trim($id); $deleteWorking = find_working($id); if ($deleteWorking) { delete_working(0, $id); delete_photo(0, $id); $message = "<div class = 'alert alert-success' style = 'width: 350px;'>{$name} has been successfully deleted.</div>"; echo "<script>"; //go back to viewMed page after 3 seconds. echo "setTimeout(function(){ document.location = '?p=viewWorking'; }, 2000);"; echo "</script>"; } else { $message = "<div class = 'alert alert-warning' style = 'width: 350px;'>Specified working scholar cannot be found</div>"; } } ?> <html> <body> <div class="container"> <div class="row"> <div class="col-lg-4"> <?php echo $message; ?> </div>
$_img .= "<a href='/forms/name/deletephotonomera/namefile/" . $name_file . "/id/" . $_GET['id'] . "' border=0><img src='/image/del.gif' border=0 alt='Удалить' onClick = 'return ConfirmButton_onClick()'></a>"; } $_photos .= '<div>' . $_img . '<input type="file" name="file' . $i . '"></div>'; } // заменяеміе значения $mass_result_for_parsing = array(selecct_array1_return($_nomera, "FORM[wc]", "No", 'class="input_style" id="cwc"', $_all_data['wc']), selecct_array1_return($_nomera, "FORM[shower]", "No", 'class="input_style" id="cshower"', $_all_data['shower']), selecct_array1_return($_place_nomer, "FORM[cost_place_nomer]", "No", 'class="input_style" id="ccost_place_nomer"', $_all_data['cost_place_nomer']), $_photos, $_img_01, $_GET['id'], $_all_data['cost_may'], $_all_data['cost_june'], $_all_data['cost_july'], $_all_data['cost_august'], $_all_data['cost_september'], $_all_data['description'], $_all_data['type'], selecct_array1_return($_standart, "FORM[tv]", "No", 'class="input_style" id="ctv"', $_all_data['tv']), selecct_array1_return($_standart, "FORM[without_food]", "No", 'class="input_style" id="cwithout_food"', $_all_data['without_food']), selecct_array1_return($_standart, "FORM[refrigerator]", "No", 'class="input_style" id="crefrigerator"', $_all_data['refrigerator']), selecct_array1_return($_standart, "FORM[conditioner]", "No", 'class="input_style" id="cconditioner"', $_all_data['conditioner'])); // имя файла с путем $name_file = "/tpl/forms/nomer_edit.tpl.html"; // парсим данные $_str = parsing_tpl($name_file, $mass_element_for_parsing, $mass_result_for_parsing, $_str); } else { $_str = get_content('soobshhenie_dlja_nepartnera'); } break; case 'deletephotonomera': delete_photo('nomera', $_GET['namefile']); // выводим сообщение $new_message = new Show_Message("wrong", "Внимание", "Фото удалено!", "3", "forms/name/redaktirovanie_dannyx_o_nomere/id/" . $_GET['id']); $_str = $new_message->Get_Message(); break; } } // ************************************************************************ // ******** ЗАПИСЬ ******************************************************** // ************************************************************************ if (isset($_GET['write'])) { require_once HOST . '/captcha/securimage.php'; $image = new Securimage(); //$image->show(); // Code Validation $image = new Securimage();
<?php if (isset($_REQUEST['name']) && isset($_REQUEST['stor'])) { if ($storage->delete($_REQUEST['stor'], 'original/' . $_REQUEST['name'])) { $storage->delete($_REQUEST['stor'], '200/' . $_REQUEST['name']); delete_photo($_REQUEST['name'], 'name'); echo '删除成功'; } else { fail('删除失败'); } } else { fail('请指定 name 和 stor'); }