コード例 #1
0
ファイル: post.php プロジェクト: nandkunal/ssb-repo
<?php

require_once "administrator/includes/ADAO.php";
$cat_id = 1004;
$bt = $_POST['bt'];
$cname = $_POST['cname'];
$curl = $_POST['crul'];
$contact = $_POST['contact'];
$city = $_POST['city'];
$distt = $_POST['distt'];
$state = $_POST['state'];
$address = $_POST['address'];
$cdes = $_POST['cdes'];
$res = ADAO::postAds($cat_id, $bt, $cname, $curl, $contact, $city, $distt, $state, $address, $cdes);
if ($res == 1) {
    ?>
	<script>
	alert("Congratulations, Your Ad has been Posted Successfully ");
	window.location.href="postad.php";
	</script>
    <?php 
} else {
    ?>
	
	<script>
	alert("Error!!");
	window.location.href="postad.php";
	</script>
	<?php 
}
?>
コード例 #2
0
$distt = $_POST['distt'];
$state = $_POST['state'];
$cdes = $_POST['cdes'];
$features = $_POST['features'];
$logo = $_FILES["file"]["name"];
$logo_file_path_thumb = "classified";
$logo_path = $logo_file_path_thumb . "/" . $logo;
move_uploaded_file($_FILES["file"]["tmp_name"], $logo_file_path_thumb . "/" . $logo);
$image->load($logo_file_path_thumb . "/" . $logo);
$image->resize(75, 75);
$image->save($logo_file_path_thumb . "/" . $logo);
chmod($logo_file_path_thumb . "/" . $logo, 0755);
$user_id = $_SESSION['id'];
$role = USER_ROLE;
$priority = 3;
$res = ADAO::postAds($user_id, $cat_id, $bt, $cname, $website, $curl, $contact, $mobile, $city, $distt, $state, $address, $logo, $cdes, $priority, $features);
if ($res == 1) {
    ?>
	<script>
	alert("Congratulations, Your Ad has been Posted Successfully ");
	window.location.href="home.php";
	</script>
    <?php 
} else {
    ?>
	
	<script>
	alert("Error!!");
	window.location.href="home.php";
	</script>
	<?php