• Tidak ada hasil yang ditemukan

Aplikasi Periklanan Berbasis Web

N/A
N/A
Protected

Academic year: 2017

Membagikan "Aplikasi Periklanan Berbasis Web"

Copied!
81
0
0

Teks penuh

(1)

LISTING PROGRAM

1. Halaman Awal Website (master.php) <?php

session_start(); error_reporting(0);

// Panggil semua fungsi yang dibutuhkan (semuanya ada di folder config)

include "config/class_database.php"; include "config/serverconfig.php"; include "config/debug.php";

include "config/fungsi_indotgl.php"; include "config/library.php";

include "config/fungsi_autolink.php"; include "config/fungsi_badword.php"; include "config/fungsi_rupiah.php"; include "config/fungsi_url.php"; include "config/time_since.php";

(2)

if ($_GET['module'] == 'ads'){

$des_ads = $db->database_fetch_array($db->database_prepare("SELECT description,image1 FROM as_advertising WHERE advertising_id = ?")->execute($_GET['id']));

$des = $des_ads['description'];

$des_image = "http://www.pasangiklan.com/images/photo_adv/$des_ads[i

mage1]"; }

else{

$des_ads =

$db->database_fetch_array($db->database_prepare("SELECT meta_description FROM as_identity WHERE identity_id = ?")->execute(1));

$des = $des_ads['meta_description'];

$des_image = "http://www.pasangiklan.com/images/"; }

?>

<!DOCTYPE html> <html>

<head>

<title><?php include "title.php"; ?></title> <meta charset="utf-8">

(3)

<meta name="description" content="<?php echo $des; ?>">

<meta name="keywords" content="<?php include "keywords.php"; ?>">

<meta http-equiv="Copyright" content="CV. Sabar Parlindungan - www.pasangiklan.com">

<meta name="author" content="Dewi Aprilina -

[email protected] -

www.SabarParlindungan.com - www.dewiaprilina.com"> <meta http-equiv="imagetoolbar" content="no"> <meta name="language" content="English">

<meta name="revisit-after" content="7"> <meta name="webcrawlers" content="all"> <meta name="rating" content="general"> <meta name="spiders" content="all">

<link rel="shortcut icon" href="images/" />

<meta property="og:description" content="<?php echo $des; ?>">

<meta property="og:image" content="<?php echo $des_image; ?>" />

(4)

<link rel="stylesheet" href="css/layout.css" type="text/css" />

<link rel="stylesheet" href="css/navigation.css" type="text/css" />

<!-- Homepage Specific Elements -->

<!--<script type="text/javascript" src="js/jquery-1.4.1.min.js"></script>-->

<script type="text/javascript" src="js/jquery-1.6.3.min.js"></script>

<script type="text/javascript" src="js/jquery-ui-1.7.2.custom.min.js"></script>

<?php if ($_GET['module'] != 'classified_detail' || $_GET['module'] != 'other-ads'){ ?>

<script type="text/javascript" src="js/jquery.tabs.setup.js"></script>

<?php } ?>

<!--End Homepage Specific Elements -->

<script type="text/javascript" src="js/chat.js"></script>

(5)

<script src="js/js/ChunkFive_400.font.js" type="text/javascript"></script>

<script type="text/javascript">

Cufon.replace('h1',{ textShadow: '1px 1px #000'}); Cufon.replace('h2',{ textShadow: '1px 1px #000'}); Cufon.replace('.footer',{ textShadow: '1px 1px #000'});

Cufon.replace('.pxs_loading',{ textShadow: '1px 1px #000'});

$(document).ready(function() {

//$('select.sort').selectric();

enableSelectBoxes();

function enableSelectBoxes(){

$('div.selectBox').each(function(){

$(this).children('span.selected').html($(this).chi ldren('div.selectOptions').children('span.selectOption: first').html());

(6)

ptions').children('span.selectOption:first').attr('valu e'));

$(this).children('span.selected,span.selectArrow') .click(function(){

if($(this).parent().children('div.selectOptions'). css('display') == 'none'){

$(this).parent().children('div.selectOptions').css ('display','block');

} else {

$(this).parent().children('div.selectOptions').css ('display','none');

} });

(7)

$(this).parent().css('display','none');

$(this).closest('div.selectBox').attr('value',$(th is).attr('value'));

$(this).parent().siblings('span.selected').html($( this).html());

}); }); }//--> });

</script>

<style type="text/css"> .error {

font-size:small;

-webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px;

border-color: #eed3d7; background-color: #b94a48; color: #FFFFFF;

(8)

}

.user_error {

font-size:small;

-webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px;

border-color: #eed3d7; background-color: #b94a48; color: #FFFFFF;

padding: 5px; width: 266px; }

.available {

font-size:small;

-webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px;

border-color: #eed3d7;

(9)

.user_available {

font-size:small;

-webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px;

border-color: #eed3d7;

color: #FFFFFF; padding: 5px;

width: 266px; }

#ajaxBusy{

margin: 0px auto; /* left margin is half width of the div, to centre it */

padding: 30px 10px 10px 10px; position: absolute;

left: 30%; top: 225px; width: 500px; height: 150px;

text-align: center; border-radius: 5px;

(10)

border: 1px solid #CCCCCC; }

#pageshare {position:fixed; top:35%; left:10px; float:left; border: 1px solid #CCCCCC;

border-radius:5px;-moz-border-radius:5px;-webkit-border-radius:5px;background-color:#eff3fa;padding:0 0 2px 0;z-index:10;}

#pageshare .sbutton {float:left;clear:both;margin:5px 5px 0 5px;}

.fb_share_count_top {width:48px !important;}

.fb_share_count_top, .fb_share_count_inner {-moz-border-radius:3px;-webkit-border-radius:3px;}

.FBConnectButton_Small,

.FBConnectButton_RTL_Small {width:49px !important; -moz-border-radius:3px;-webkit-border-radius:3px;}

.FBConnectButton_Small .FBConnectButton_Text {padding:2px 2px 3px !important;-moz-border-radius:3px;-webkit-border-radius:3px;font-size:8px;}

(11)

<script>!function(d,s,id){var

js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementByI d(id)){js=d.createElement(s);js.id=id;js.src="https://p latform.twitter.com/widgets.js";fjs.parentNode.insertBe

fore(js,fjs);}}(document,"script","twitter-wjs");</script> </head>

<body id="top">

<div id="fb-root"></div> <script>

var appid = '255449991303140'; window.fbAsyncInit = function() {

FB.init({

appId: appid, cookie: true, status: true, xfbml: true,

oauth : true, // enables OAuth 2.0 frictionlessRequests : true

}); };

(12)

var e = document.createElement('script'); e.async = true;

e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js';

document.getElementById('fb-root').appendChild(e);

}());

function connect_fb(){

FB.login(function (response) { if (response.authResponse) {

var access_token =

FB.getAuthResponse()['accessToken'];

if(access_token==undefined) {

access_token=response.authResponse.accessToken; }

$.ajax({

async:false, url:

"modul/mod_sign_up/register.php",

(13)

data: {

oauth_token:access_token },

beforeSend: function (response) {

$('body').append('<div id="ajaxBusy"><p id="ajaxBusyMsg">Please wait...</p></div>');

//$("#ajaxBusy").show(); },

complete: function(){

$("#ajaxBusy").hide();

},

success: function () { <?php

$full_url = full_url();

if (strpos($full_url, "?frm=yes") == TRUE){

(14)

top.location.href = "http://www.SabarParlindungan.com/jualbeli/forum/"

<?php }

else{ ?>

top.location.href = "<?php echo $url_server; ?>/jualbeli/profile.html"

<?php } ?> }

}); }

}, { scope: 'publish_actions,email,publish_stream,user_about_me'

});

} </script>

(15)

<div id="navigation_wrap"> <?php

if ($_SESSION['email_login'] != ''){

$name_login = $db->database_fetch_array($db->database_prepare("SELECT username,photo FROM as_member WHERE email = ?")->execute($_SESSION['email_login']));

?>

<!-- Start contact info area --> <div id="conteactinfo">

<?php if ($name_login['photo'] != ''){

echo "<img src='images/photo_member/thumb/small_$name_login[photo]

' height='25' style='border-radius: 5px; border: 1px solid #ccc;'>";

} ?>

<div style="padding-bottom: 10px; float:right; padding-left: 10px; margin-top: 2px;">Hi, <b><?php echo $name_login['username']; ?></b></div>

</div>

<!-- End contact info area --> <!-- Start navigation -->

(16)

$num_messages_new = $db->database_num_rows($db->database_prepare("SELECT * FROM as_messages WHERE sendto = ? AND status = 0")->execute($_SESSION["member_login"]));

?>

<div id="navi"> <ul>

<li><a href="profile.html" title="Profile">Akun Saya</a></li>

<li><a href="myads-1-1.html" title="My Ads">Iklan</a></li>

<li><a

href="messages-1-1.html" title="Messages">Pesan (<?php echo $num_messages_new; ?>)</a></li>

<li><a href="discount-1-1.html" title="My Discount & Sale Info">Info Discount & Sale</a></li>

<li><a href="logout.php" title="Sign Out">Logout</a></li>

</ul> </div>

<div id="conteactinfo2">

(17)

<a

href="add_discount_sale.html"><button type="button" class="freeads">+ DISCOUNT INFO ANDA</button></a>

</div>

<!-- End navigation --> <?php

} else{ ?>

<div id="navi2"> <ul>

<li><a href="sign-in.html" title="Sign In">SIGN IN</a></li>

<li><a href="sign-up.html" title="Sign Up">SIGN UP</a></li>

</ul> </div> <?php

} ?> </div> </div>

(18)

<div id="header" class="clear"> <div class="fl_left">

<h1><a href="#"><img src="images/logositus.jpg" height="75"

width="300"></a></h1> </div>

<div class="fl_right"> <?php

$sql_top_adv = $db->database_prepare("SELECT * FROM as_top_ads WHERE active = 'Y' ORDER BY rand() LIMIT 1")->execute();

while($data_top_adv = $db->database_fetch_array($sql_top_adv)){

$created_date = md5(date('Ymdhis'));

echo "<div class='adv_top'> <a

href='modul/mod_home/b.php?u=$data_top_adv[url]&id=$dat a_top_adv[top_ads_id]&TA_$created_date'

title='$data_top_adv[title]' target='_blank'> <img

src='images/top_adv/$data_top_adv[image]' border=0 width=450 height=90></a>

(19)

} ?> </div> </div>

</div>

<!--

####################################################### ################################################ --> <div class="wrapper row2">

<div class="rnd"> <!-- ###### --> <div id="topnav">

<ul>

<li class="active"><a href="home">Home</a></li>

<li><a

href="classified.html">Kategori Iklan</a></li>

<li><a href="event-0-1-all+provinces.html">Acara</a></li>

<li><a href="discount-sale-info.html">Info Discount & Sale</a></li>

(20)

<?php

if ($_SESSION['email_login'] != ''){

echo "<li><a href='pay-per-click-1-1.html'>Iklan PPC</a></li>";

} ?> </ul> </div>

<!-- ###### --> </div>

</div>

<!--

####################################################### ################################################ --> <?php include "slider.php"; ?>

<!--

####################################################### ################################################ --> <div class="wrapper row3">

<div class="rnd">

(21)

<!--

####################################################### ################################################ -->

<div id="homepage" class="clear">

<?php

include "breadcumb.php"; include "content.php"; ?>

<!--

####################################################### ################################################ -->

<!--

####################################################### ################################################ -->

</div> </div>

</div> <!--

####################################################### ################################################ -->

(22)

<p class="fl_left"><br>&copy; <?php echo

date('Y'); ?><b><a href="#" class="black">pasangiklan.com</a></b>

<span>

| <a href="about-us.html" class="black">Tentang Kami</a>

| <a href="terms_conditions.html" class="black">Syarat dan Kondisi</a>

| <a href="contact.html" class="black">Hubungi Kami</a>

</span> </p>

</div>

<!-- The JavaScript -->

<script type="text/javascript" src="js/js/jquery.easing.1.3.js"></script>

<script type="text/javascript"> (function($) {

$.fn.parallaxSlider = function(options) {

var opts = $.extend({}, $.fn.parallaxSlider.defaults, options);

return this.each(function() {

(23)

o = $.meta ? $.extend({}, opts, $pxs_container.data()) : opts;

//the main slider

var $pxs_slider =

$('.pxs_slider',$pxs_container),

//the elements in the slider

$elems =

$pxs_slider.children(),

//total number of elements

total_elems =

$elems.length,

//the navigation buttons

$pxs_next =

$('.pxs_next',$pxs_container),

$pxs_prev =

$('.pxs_prev',$pxs_container),

//the bg images

$pxs_bg1 =

$('.pxs_bg1',$pxs_container),

$pxs_bg2 =

$('.pxs_bg2',$pxs_container),

$pxs_bg3 =

$('.pxs_bg3',$pxs_container),

(24)

current = 0, //the thumbs container

$pxs_thumbnails = $('.pxs_thumbnails',$pxs_container),

//the thumbs

$thumbs =

$pxs_thumbnails.children(),

//the interval for the autoplay mode

slideshow,

//the loading image $pxs_loading = $('.pxs_loading',$pxs_container),

$pxs_slider_wrapper = $('.pxs_slider_wrapper',$pxs_container);

//first preload all the images

var loaded = 0,

$images =

$pxs_slider_wrapper.find('img');

$images.each(function(){ var $img = $(this);

(25)

if(loaded == total_elems*2){

$pxs_loading.hide();

$pxs_slider_wrapper.show();

//one images width (assuming all images have the same sizes)

var one_image_w = $pxs_slider.find('img:first').width();

/*

need to set width of the slider,

of each one of its elements, and of the

navigation buttons */

setWidths($pxs_slider,

$elems,

(26)

one_image_w, $pxs_next, $pxs_prev);

/*

set the width of the thumbs

and spread them evenly

*/

$pxs_thumbnails.css({

'width' : one_image_w + 'px',

'margin-left' : -one_image_w/2 + 'px'

});

var spaces =

one_image_w/(total_elems+1);

$thumbs.each(function(i){

var $this = $(this);

(27)

$this.css('left',left+'px');

if(o.thumbRotation){

var angle = Math.floor(Math.random()*41)-20;

$this.css({

'-moz-transform' : 'rotate('+ angle +'deg)',

'-webkit-transform' : 'rotate('+ angle +'deg)',

'transform' : 'rotate('+ angle

+'deg)'

}); }

//hovering the thumbs animates them up and down

$this.bind('mouseenter',function(){

(28)

}).bind('mouseleave',function(){

$(this).stop().animate({top:'0px'},100); }); });

//make the first thumb be selected

highlight($thumbs.eq(0));

//slide when clicking the navigation buttons

$pxs_next.bind('click',function(){

++current;

if(current >= total_elems)

if(o.circular)

current = 0;

else{

(29)

return false;

}

highlight($thumbs.eq(current));

slide(current, $pxs_slider, $pxs_bg3, $pxs_bg2, $pxs_bg1, o.speed, o.easing, o.easingBg); });

$pxs_prev.bind('click',function(){

--current;

if(current < 0)

if(o.circular)

current = total_elems - 1;

else{

(30)

return false;

}

highlight($thumbs.eq(current));

slide(current, $pxs_slider, $pxs_bg3, $pxs_bg2, $pxs_bg1, o.speed, o.easing, o.easingBg); });

/*

clicking a thumb will slide to the respective image

*/

$thumbs.bind('click',function(){

var $thumb = $(this);

(31)

//if autoplay interrupt when user clicks

if(o.auto)

clearInterval(slideshow);

current = $thumb.index();

slide(current, $pxs_slider, $pxs_bg3, $pxs_bg2, $pxs_bg1, o.speed, o.easing, o.easingBg); });

/*

activate the autoplay mode if

that option was specified

(32)

if(o.auto != 0){ o.circular = true;

slideshow = setInterval(function(){

$pxs_next.trigger('click');

},o.auto); }

/*

when resizing the window,

we need to recalculate the widths of the

slider elements, based on the new windows width.

we need to slide again to the current one,

since the left of the slider is no longer correct

*/

(33)

w_w = $(window).width();

setWidths($pxs_slider,$elems,total_elems,$pxs_bg1, $pxs_bg2,$pxs_bg3,one_image_w,$pxs_next,$pxs_prev);

slide(current, $pxs_slider, $pxs_bg3, $pxs_bg2, $pxs_bg1, 1,

o.easing, o.easingBg); });

}

}).error(function(){ alert('here')

}).attr('src',$img.attr('src')); });

(34)

};

//the current windows width

var w_w = $(window).width();

var slide = function(current,

$pxs_slider, $pxs_bg3, $pxs_bg2, $pxs_bg1, speed, easing, easingBg){

var slide_to = parseInt(-w_w *

current);

$pxs_slider.stop().animate({ left : slide_to + 'px' },speed, easing);

$pxs_bg3.stop().animate({ left : slide_to/2 + 'px' },speed, easingBg);

$pxs_bg2.stop().animate({ left : slide_to/4 + 'px' },speed, easingBg);

(35)

left : slide_to/8 + 'px' },speed, easingBg);

}

var highlight = function($elem){

$elem.siblings().removeClass('selected'); $elem.addClass('selected'); }

var setWidths = function($pxs_slider, $elems,

total_elems, $pxs_bg1, $pxs_bg2, $pxs_bg3, one_image_w, $pxs_next, $pxs_prev){

/*

the width of the slider is the windows width

times the total number of elements in the slider

(36)

var pxs_slider_w = w_w * total_elems; $pxs_slider.width(pxs_slider_w + 'px'); //each element will have a width = windows width

$elems.width(w_w + 'px'); /*

we also set the width of each bg image div.

The value is the same calculated for the pxs_slider

*/

$pxs_bg1.width(pxs_slider_w + 'px'); $pxs_bg2.width(pxs_slider_w + 'px'); $pxs_bg3.width(pxs_slider_w + 'px');

/*

both the right and left of the

navigation next and previous buttons will be:

windowWidth/2 - imgWidth/2 + some margin (not to touch the image borders)

*/

var position_nav = w_w/2 -

one_image_w/2 + 3;

(37)

$pxs_prev.css('left', '0px'); }

$.fn.parallaxSlider.defaults = {

auto : 0, //how many seconds

to periodically slide the content.

//If set to 0 then autoplay is turned off.

speed : 1000,//speed of

each slide animation

easing : 'jswing',//easing

effect for the slide animation

easingBg : 'jswing',//easing

effect for the background animation

circular : true,//circular slider thumbRotation : true//the thumbs will be randomly rotated

};

//easeInOutExpo,easeInBack })(jQuery);

</script>

<script type="text/javascript"> $(function() {

(38)

$pxs_container.parallaxSlider(); });

</script>

</body> </html>

2. index.php

<?php

header("Location: home"); ?>

3. slider.php

<?php

if ($_GET['module']=='home'){ ?>

<link type="text/css" rel="stylesheet" href="css/base.css"/>

<link type="text/css" rel="stylesheet" href="css/slider.css"/>

(39)

<link href="css/jquery.slider.css" rel="stylesheet" type="text/css" />

<script type="text/javascript" src="js/slider.js"></script>

<script type="text/javascript" src="js/jquery.easing.1.3.js"></script>

<script type="text/javascript" src="js/jquery.skitter.min.js"></script>

<script type="text/javascript" src="js/jquery.slider.min.js"></script>

<script type="text/javascript">

// when the DOM is ready, convert the feed anchors into feed content

$(document).ready(function(){

jQuery('#newsslider').accessNews({

});

$('.box_skitter_large').skitter({label: false, numbers: false, theme: 'square'});

$('#slider').slider(); });

(40)

<div class="wrapper row3"> <table width="960">

<tr valign="top"> <td witdh="600">

<ul id="newsslider"> <?php

$sql_slide = $db->database_prepare("SELECT * FROM as_articles WHERE headline='Y' AND active = 'Y' ORDER BY article_id DESC")->execute();

while($data_slide = $db->database_fetch_array($sql_slide)){

$content_slide = strip_tags($data_slide['description']);

$content_s = substr($content_slide,0,150);

$content_s = substr($content_s,0,strrpos($content_slide," "));

echo " <li>

(41)

<h3><a href='read-art-$data_slide[article_id]-$data_slide[title_seo].html'

class='black'>$data_slide[title]</a></h3>

<p>$content_s <br><a href='read-art-$data_slide[article_id]-$data_slide[title_seo].html' class='black'>&raquo; read more</a></p>

</li>"; }

?> </ul> </td>

<td align="right">

<div id="slider" style="width: 335px; height: 385px;">

<?php

$sql_short = $db->database_prepare("SELECT * FROM as_shorts WHERE status = 'Y' ORDER BY short_id DESC")->execute();

while ($data_short = $db->database_fetch_array($sql_short)){

(42)

<img

src='images/photo_intro/$data_short[image]' width='335' height='385'>

</div>"; }

?> </div> </td>

</tr> </table> </div>

<?php } ?>

4. right.php

<link rel="stylesheet" type="text/css" media="all" href="js/fancybox/jquery.fancybox.css">

<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2

(43)

<script type="text/javascript" src="js/fancybox/jquery.fancybox.js?v=2.0.6"></script>

<link rel="stylesheet" href="css/jquery-tab.css" type="text/css" />

<script src="http://code.jquery.com/ui/1.10.4/jquery-ui.js"></script>

<script src="js/jquery.validate.js" type="text/javascript" charset="utf-8"></script>

<script src="js/jquery.selectric.min.js"></script> <script>

jQuery(document).ready(function(){

$("#email").change(function()

{ //if theres a change in the username textbox var email = $("#email").val();//Get the value in the username textbox

$("#email_status").html('<img src="images/loader.gif"

align="absmiddle">&nbsp;Checking...');

//Add a loading image in the span id="availability_status"

$.ajax({ //Make the Ajax Request type: "POST",

(44)

data: "friend_email="+ email, //data success: function(server_response){

$("#email_status").ajaxComplete(function(event, request){

if(server_response == '2')//if it returns "1"

{

$("#email_status").html('<div

class="error">Invalid email address.</div>');

document.getElementById("send").disabled = true; }

else if(server_response == '1')//if it returns "1"

{

$("#email_status").html('');

document.getElementById("send").disabled = false; }

}); }

(45)

});

$("#send").on("click", function(){ var msgval = $("#msg").val(); var memberid= $("#member_id").val(); var div = $("#div").val(); var page = $("#page").val(); var type = $("#type").val(); var nm = $("#nm").val();

var subject = $("#subject").val(); var email = $("#email").val();

var msglen = msgval.length; var sublen = subject.length; var mallen = email.length;

if (sublen != 0 && msglen > 4 && mallen != 0){

$("#send").replaceWith("<em>Sending...</em>");

$.ajax({

type: 'POST',

url: 'send_email.php',

(46)

success: function(data) { if(data == "true") {

$("#contact2").fadeOut("fast", function(){

$(this).before("<p><strong>Success! Your email has been sent.</strong></p>");

setTimeout("$.fancybox.close()", 1000);

top.location.href = 'http://www.oaseast.com/other-ads-'+memberid+'-'+div+'-'+type+'-'+page+'-'+nm+'.html';

}); }

} }); }

});

$(".modalbox2").fancybox();

$('select.sort').selectric(); });

(47)

<div id="left_column"> <?php

if ($_GET['module'] == 'classified_detail'){ ?>

<script type="text/javascript" src="js/vsmenu.js"></script>

<link rel="stylesheet" type="text/css" href="css/vsmenu.css">

<label class="badge">Kategori Iklan</label> <ul class="vsmenu vs_creamy">

<?php

$nm = strtolower(str_replace(" ", "+", $_GET['nm']));

$sql_gr = $db->database_prepare("SELECT * FROM as_groups WHERE status = 'Y' ORDER BY group_name ASC")->execute();

while ($data_gr = $db->database_fetch_array($sql_gr)){

(48)

if ($nums > 0){

echo "<li><a href='classified- $data_gr[group_id]-1-1-1-$_GET[verified]-$_GET[pid]-0-$nm.html'>$data_gr[group_name]</a><ul>";

$sql_ct = $db->database_prepare("SELECT * FROM as_categories WHERE group_id = ? AND status = 'Y' ORDER BY category_name ASC")->execute($data_gr['group_id']);

while ($data_ct = $db->database_fetch_array($sql_ct)){

echo "<li><a

href='classified-$data_gr[group_id]-$_GET[div]- $_GET[page]-1-$_GET[verified]-$_GET[pid]-

$data_ct[category_id]-$nm.html'>$data_ct[category_name]</a></li>"; }

echo "</ul></li>"; }

else{

echo "<li><a

href='classified-$data_gr[group_id]-1-1-1-

$_GET[verified]-$_GET[pid]-0-$nm.html'>$data_gr[group_name]</a></li>"; }

(49)

?> </ul>

<br> <?php }

if ($_GET['module'] == 'events' || $_GET['module'] == 'event-detail'){

?>

<script type="text/javascript" src="js/vsmenu.js"></script>

<link rel="stylesheet" type="text/css" href="css/vsmenu.css">

<br>

<label class="badge">Cari Berdasarkan Propinsi</label>

<ul class="vsmenu vs_creamy"> <?php

$sql_province = $db->database_prepare("SELECT * FROM as_provinces WHERE status = 'Y' ORDER BY province_name ASC")->execute();

(50)

$nums = $db->database_num_rows($db->database_prepare("SELECT event_id FROM as_events WHERE province_id = ? AND status = 'Y'")->execute($data_province['province_id']));

$province = strtolower(str_replace(" ", "+",

$data_province['province_name']));

echo "<li><a href='event-

$data_province[province_id]-1-$province.html'>$data_province[province_name] <span style='float: right;'>$nums</span></a></li>";

} ?> </ul>

<br> <?php }

if ($_GET['module'] == 'discount_classified_detail'){

(51)

<script type="text/javascript" src="js/vsmenu.js"></script>

<link rel="stylesheet" type="text/css" href="css/vsmenu.css">

<br>

<label class="badge">Filter by Provinces:</label>

<ul class="vsmenu vs_creamy"> <?php

$title = strtolower(str_replace(" ", "+", $_GET["title"]));

$sql_province = $db->database_prepare("SELECT * FROM as_provinces WHERE status = 'Y' ORDER BY province_name ASC")->execute();

while ($data_province = $db->database_fetch_array($sql_province)){

$nums = $db->database_num_rows($db->database_prepare("SELECT discount_id FROM as_discounts WHERE province_id = ? AND active = 'Y'")->execute($data_province['province_id']));

$province = strtolower(str_replace(" ", "+",

(52)

echo "<li><a href='discount-

classified-$_GET[id]-$data_province[province_id]-

$_GET[page]-$_GET[type]-$title.html'>$data_province[province_name] <span style='float: right;'>$nums</span></a></li>";

} ?> </ul>

<br> <?php }

if ($_GET['module'] == 'articles'){ ?>

<script type="text/javascript" src="js/vsmenu.js"></script>

<link rel="stylesheet" type="text/css" href="css/vsmenu.css">

<br>

<label class="badge">Kategori Artikel</label> <ul class="vsmenu vs_creamy">

(53)

$sql_art = $db->database_prepare("SELECT * FROM as_art_categories WHERE active = 'Y' ORDER BY category_name ASC")->execute();

while ($data_art = $db->database_fetch_array($sql_art)){

$nums = $db->database_num_rows($db->database_prepare("SELECT category_id FROM as_articles WHERE category_id = ? AND active = 'Y'")->execute($data_art['category_id']));

echo "<li><a href='articles-

$data_art[category_id]-1-$data_art[category_seo].html'>$data_art[category_name] <span style='float: right;'>$nums</span></a></li>";

} ?> </ul>

<br> <?php }

(54)

<script type="text/javascript" src="js/vsmenu.js"></script>

<link rel="stylesheet" type="text/css" href="css/vsmenu.css">

<br>

<label class="badge">Kategori Berita</label> <ul class="vsmenu vs_creamy">

<?php

$sql_news_cat = $db->database_prepare("SELECT * FROM as_news_categories WHERE active = 'Y' ORDER BY category_name ASC")->execute();

while ($data_news_cat = $db->database_fetch_array($sql_news_cat)){

$nums = $db->database_num_rows($db->database_prepare("SELECT category_id FROM as_news WHERE category_id = ? AND active = 'Y'")->execute($data_news_cat['category_id']));

echo "<li><a href='news-

$data_news_cat[category_id]-1-$data_news_cat[category_seo].html'>$data_news_cat[categ

(55)

} ?> </ul>

<br> <?php }

if ($_GET['module'] == 'other-ads'){

$data_member = $db->database_fetch_array($db->database_prepare("SELECT facebook_id, cellphone, hidden_cellphone, twitter_id FROM as_member WHERE member_id = ?")->execute($_GET['id']));

if ($data_member['facebook_id'] != ''){ $app_id = "255449991303140";

$secret_id = "fde2b94d49a1559c54ba706300b4a78f";

$facebook = new Facebook(array( 'appId' => $app_id,

'secret' => $secret_id, ));

(56)

$facebook_name = "<a href='http://www.facebook.com/$get_data[username]'

target='_blank' class='black'>$get_data[username]</a>";

$img_fb = "<img

src='images/facebook.png' width='16'>"; }

else{

$facebook_name = "Not Available";

$img_fb = "<img

src='images/facebook.png' width='16'>"; }

if ($data_member['hidden_cellphone'] != '1'){ $img_call = "<img src='images/call.png' width='16'>";

} else{

$img_call = ""; }

if ($data_member['cellphone'] != ''){

$cellphone = $data_member['cellphone']; }

else{

(57)

}

echo "<div style='background: none repeat scroll 0 0 #FFFFFF; border: 1px solid #DADADA; border-radius: 5px; box-shadow: 0 1px 6px rgba(0, 0, 0, 0.2); padding: 10px; width: 180px;'>

<br> <table>

<tr> <td width='20'>$img_call</td>

<td><font color='#1C60A7' size='3'><b>$cellphone</b></font></td>

</tr> </table>

<hr style='border: 1px solid #E8E8E8; margin-top: 15px; margin-bottom: 15px;'>

<a class='modalbox2' href='#inline'>

<div class='chat2'>

<img src='images/mail.png' width='22'>

(58)

<div id='inline'>

<form id='contact2' name='contact2' action='?validate=error' method='post'>

<input type='hidden' id='member_id' name='member_id' value='$_GET[id]'>

<input type='hidden' id='nm' name='nm' value='$_GET[nm]'>

<input type='hidden' id='div' name='div' value='$_GET[div]'>

<input type='hidden' id='page' name='page' value='$_GET[page]'>

<input type='hidden' id='type' name='type' value='$_GET[type]'>

<table width='100%' cellpadding='5' cellspacing='5'>

<tr> <td

style='background-color: #CCCCCC;'><p style='font-size: 18px; font-weight: bold; top: 2px; margin-bottom: 2px;'>Send Email</p></td>

</tr> <tr>

<td>

(59)

<tr valign='top'>

<td>Subject <br>

<input type='text' id='subject' class='required' placeholder='Subject' name='subject' style='background: #FFF; border: 1px solid #DDD; border-radius: 5px; box-shadow: 0 0 5px #DDD inset; color:#666; outline: none;

height: 20px; width: 260px; margin-right: 10px;

padding: 5px; margin-bottom: 10px;'>

<span id='subject_status'></span>

</td>

<td>

Email <br>

(60)

height: 20px; width: 260px; margin-right: 10px; padding: 5px; margin-bottom: 10px;'>

<span id='email_status'></span>

</td>

</tr> <tr valign='top'>

<td colspan='2'>

Message <br>

<textarea id='msg' name='msg' class='txtarea' placeholder='Enter your message here' style='background: #FFF; border: 1px solid #DDD; border-radius: 5px; box-shadow: 0 0 5px #DDD inset; color:#666; outline: none; width: 540px; margin-right: 10px; padding: 5px; height: 180px;'></textarea>

<span id='msg_status'></span>

</td>

(61)

</table> </td>

</tr> <tr>

<td><button id='send'>Send Message</button></td>

</tr> </table> </form> </div>

</div> </a>

<hr style='border: 1px solid #E8E8E8; margin-top: 15px; margin-bottom: 15px;'>

<table> <tr>

<td width='20'>$img_fb</td>

<td><b>$facebook_name</b></td> </tr>

</table>

<hr style='border: 1px solid #E8E8E8; margin-top: 15px; margin-bottom: 15px;'>

(62)

} ?>

<?php

if ($_GET['module'] == 'classified'){ $nm = md5(date('Ymdhis'));

?>

<script type="text/javascript" src="js/vsmenu.js"></script>

<link rel="stylesheet" type="text/css" href="css/vsmenu.css">

<br>

<label class="badge">Search Ads</label> <ul class="vsmenu vs_creamy">

<?php

$nm = md5(date('Ymdhis'));

$sql_province = $db->database_prepare("SELECT * FROM as_provinces WHERE status = 'Y' ORDER BY province_name ASC")->execute();

while ($data_province = $db->database_fetch_array($sql_province)){

(63)

$nums =

$db->database_num_rows($db->database_prepare("SELECT advertising_id FROM as_advertising WHERE province_id = ? AND active = 'Y'")->execute($data_province['province_id']));

echo "<li><a href='classified-0-1-

1-1-0-$data_province[province_id]-0-$title.html'>$data_province[province_name] <span style='float: right;'>$nums</span></a><li>";

} ?> </ul><br>

<!--<p style="font-weight: bold; font-size: 16px;">SEARCH ADS:</p>

<form method='GET' action='modul/mod_classified/search.php'>

<input type='hidden' name='module' value='classified_detail'>

<input type='hidden' name='id' value='0'>

<input type='hidden' name='div' value='1'>

<input type='hidden' name='page' value='1'>

(64)

<input type='hidden' name='cat' value='0'>

<input type='hidden' name='nm' value='<?php echo $nm; ?>'>

<table> <tr>

<td><p style="font-weight: bold;">Ad Type:</p>

<select name='verified' id='verified' class='white-pink2'>

<option value='0'>All</option>

<option value='1'>For Sale</option>

<option value='2'>Looking For</option>

</select> </td>

</tr> <tr>

<td><p style="font-weight: bold;">Country:</p>

(65)

<option value='0'>All Countries</option>

<?php

$sql_cou = $db->database_prepare("SELECT * FROM as_country WHERE status = 'Y' ORDER BY country_name ASC")->execute();

while

($data_cou = $db->database_fetch_array($sql_cou)){ echo "<option

value='$data_cou[country_id]'>$data_cou[country_name]</ option>";

} ?> </select> </td>

</tr> <tr>

<td><p style="font-weight: bold;">State</p>

<select name='pid' id='pid' class='white-pink'>";

<option value='0'>All States</option>

(66)

</td> </tr>

</table>

<p><input type="submit" class="button_facebook" name="submit" value="SEARCH

ADS" style="width: 190px;"></p> </form>

<p>&nbsp;</p>--> <?php

}

if ($_GET['module'] == 'discount_sale_info'){ $nm = md5(date('Ymdhis'));

?>

<script type="text/javascript" src="js/vsmenu.js"></script>

<link rel="stylesheet" type="text/css" href="css/vsmenu.css">

<br>

<label class="badge">Filter by Provinces</label>

(67)

$sql_province = $db->database_prepare("SELECT * FROM as_provinces WHERE status = 'Y' ORDER BY province_name ASC")->execute();

while ($data_province = $db->database_fetch_array($sql_province)){

$nums = $db->database_num_rows($db->database_prepare("SELECT discount_id FROM as_discounts WHERE province_id = ? AND active = 'Y'")->execute($data_province["province_id"]));

echo "<li><a href='discount-

classified-0-$data_province[province_id]-1-1-all+groups.html'>$data_province[province_name] <span style='float: right;'>$nums</span></a></li>";

} ?> </ul><br> <?php

}

if ($_GET['module'] == 'open_tourism' || $_GET['module'] == 'read_tourism'){

?>

(68)

<link rel="stylesheet" type="text/css" href="css/vsmenu.css">

<br>

<label class="badge">Cari Berdasarkan Negara</label>

<ul class="vsmenu vs_creamy"> <?php

$sql_country = $db->database_prepare("SELECT * FROM as_tourism_country WHERE status = 'Y' ORDER BY country ASC")->execute();

while ($data_country = $db->database_fetch_array($sql_country)){

if ($data_country['flag'] != ''){

$img = "<img src='images/photo_flag/$data_country[flag]' width='20'

height='15'>";

} else{

$img = ""; }

(69)

echo "<li><a href='open-tourism-

$data_country[tourism_country_id]-1-$data_country[country_seo].html'>$img

$data_country[country] <span style='float: right;'>$nums</span></a></li>";

} ?> </ul><br> <?php

}

if ($_GET['module'] != 'other-ads' && $_GET['module'] != 'open_tourism' && $_GET['module'] != 'read_tourism'){

echo "<link rel='stylesheet' type='text/css' href='css/vsmenu.css'>";

echo "<label class='badge'>Promosikan Iklan Anda</label><br>";

$sql_ppc_right = $db->database_prepare("SELECT * FROM as_ppc WHERE status = 'Y' ORDER BY rand() LIMIT 5")->execute();

(70)

if ($data_ppc_right['image'] != ''){ $image = "<span class='image'><img src='images/photo_ppc/thumb/small_$data_ppc_right[image ]' width='50' height='50'></span>";

} else{

$image = "<img src='images/no_image.jpg' width='50' height='50'>";

}

$created = md5(date('Ymdhis'));

echo "<p style='border-bottom: 1px solid #999999; text-align: justify; font: 13px/19px Arial,serif; width: 205px; min-height: 125px;'>

<a

href='modul/mod_ppc/a.php?u=$data_ppc_right[url]&pid=$d ata_ppc_right[ppc_id]&mid=$data_ppc_right[member_id]&CD _$created' target='_blank' class='black'>

(71)

<font

size='1'>$data_ppc_right[description]</font> </p>";

} }

?> </div>

5. title.php

<?php

if ($_GET['module'] == 'about'){

echo "About Us - pasangiklan.com "; }

elseif ($_GET['module'] == 'classified'){ echo "Classifieds of pasangiklan.com"; }

elseif ($_GET['module'] == 'classified_detail'){

if ($_GET['cat'] != '0' AND $_GET['id'] != '0'){ $data_gr_title = $db->database_fetch_array($db->database_prepare("SELECT

(72)

JOIN as_categories B ON B.group_id=A.group_id WHERE B.category_id = ?")->execute($_GET["cat"]));

echo "$data_gr_title[group_name] -

$data_gr_title[category_name] - pasangiklan.com"; }

elseif ($_GET['cat'] == '0' AND $_GET['id'] != '0'){

$data_gr_title = $db->database_fetch_array($db->database_prepare("SELECT A.group_name FROM as_groups A WHERE A.group_id = ?")->execute($_GET["id"]));

echo "$data_gr_title[group_name] - pasangiklan.com";

} else{

if ($_GET['pid'] != '0'){

$data_gr_title = $db->database_fetch_array($db->database_prepare("SELECT A.region_name, B.country_name, C.province_name FROM

as_region A LEFT JOIN as_country B ON A.region_id=B.region_id

(73)

WHERE C.province_id = ?")->execute($_GET["pid"]));

echo "Classifieds of

$data_gr_title[region_name] -

$data_gr_title[country_name] -

$data_gr_title[province_name] - pasangiklan.com"; }

else{

if ($_GET['cid'] != '0'){

$data_gr_title = $db->database_fetch_array($db->database_prepare("SELECT A.region_name, B.country_name, C.province_name FROM

as_region A LEFT JOIN as_country B ON A.region_id=B.region_id

LEFT JOIN as_provinces C ON C.country_id=B.country_id

WHERE B.country_id = ?")->execute($_GET["cid"]));

echo "Classifieds of

$data_gr_title[region_name] -

(74)

} else{

$data_gr_title = $db->database_fetch_array($db->database_prepare("SELECT A.region_name, B.country_name, C.province_name FROM

as_region A LEFT JOIN as_country B ON A.region_id=B.region_id

LEFT JOIN as_provinces C ON C.country_id=B.country_id

WHERE A.region_id = ?")->execute($_GET["rid"]));

echo "Classifieds of $data_gr_title[region_name] - pasangiklan.com";

} }

} }

(75)

elseif ($_GET['module'] == 'event-detail'){

$data_event_title = $db->database_fetch_array($db->database_prepare("SELECT title FROM as_events WHERE event_id = ? AND status = 'Y'")->execute($_GET["id"]));

echo "$data_event_title[title] - pasangiklan.com"; }

elseif ($_GET['module'] == 'ads'){

$data_ads_title = $db->database_fetch_array($db->database_prepare("SELECT title FROM as_advertising WHERE advertising_id = ?")->execute($_GET["id"]));

echo "$data_ads_title[title] - pasangiklan.com"; }

elseif ($_GET['module'] == 'other-ads'){

$data_other_title = $db->database_fetch_array($db->database_prepare("SELECT first_name, last_name FROM as_member WHERE member_id = ? AND status = 'Y'")->execute($_GET["id"]));

echo "$data_other_title[first_name] $data_other_title[last_name] - pasangiklan.com";

}

(76)

}

elseif ($_GET['module'] == 'discount_classified_detail'){

$data_dc_title = $db->database_fetch_array($db->database_prepare("SELECT group_name FROM as_groups WHERE group_id = ? AND status = 'Y'")->execute($_GET["id"]));

echo "$data_dc_title[group_name] - pasangiklan.com";

}

elseif ($_GET['module'] == 'discount-info'){

$data_discount_title = $db->database_fetch_array($db->database_prepare("SELECT title FROM as_discounts WHERE discount_id = ?")->execute($_GET["id"]));

echo "$data_discount_title[title] - pasangiklan.com";

}

(77)

elseif ($_GET['module'] == 'sign_up'){

echo "Free Sign Up - pasangiklan.com"; }

elseif ($_GET['module'] == 'messages'){ echo "My Messages - pasangiklan.com"; }

elseif ($_GET['module'] == 'read-messages'){ echo "Read Messages - pasangiklan.com"; }

elseif ($_GET['module'] == 'profile'){

$data_member_title = $db->database_fetch_array($db->database_prepare("SELECT first_name, last_name FROM as_member WHERE member_id = ? AND status = 'Y'")->execute($_SESSION["member_login"]));

echo "My Profile - $data_member_title[first_name] $data_member_title[last_name] ";

}

(78)

elseif ($_GET['module'] == 'add_discount_sale'){

echo "Add My Discount & Sale Info - pasangiklan.com";

}

elseif ($_GET['module'] == 'myads'){ if ($_GET['div'] == 1){

echo "My Ads - Active - pasangiklan.com"; }

elseif ($_GET['div'] == 2){

echo "My Ads - In Moderation -

pasangiklan.com"; }

elseif ($_GET['div'] == 3){

echo "My Ads - Rejected - pasangiklan.com"; }

else{

echo "My Ads - Non Active - pasangiklan.com"; }

}

elseif ($_GET['module'] == 'pay-per-click'){ if ($_GET['div'] == 1){

(79)

}

elseif ($_GET['div'] == 2){

echo "My PPC Ads - In Moderation -

pasangiklan.com"; }

elseif ($_GET['div'] == 3){

echo "My PPC Ads - Rejected -

pasangiklan.com"; }

elseif ($_GET['div'] == 4){

echo "My PPC Ads - Deposit History - pasangiklan.com";

} else{

echo "My PPC Ads - My Balance -

pasangiklan.com"; }

}

elseif ($_GET['module'] == 'discount'){ if ($_GET['div'] == 1){

echo "My Discount & Sale - Active - pasangiklan.com";

}

(80)

echo "My Discount & Sale - In Moderation - pasangiklan.com";

}

elseif ($_GET['div'] == 3){

echo "My Discount & Sale - Rejected - pasangiklan.com";

} else{

echo "My Discount & Sale - Non Active - pasangiklan.com";

} }

elseif ($_GET['module'] == 'edit_profile'){

$data_member_title = $db->database_fetch_array($db->database_prepare("SELECT first_name, last_name FROM as_member WHERE member_id = ? AND status = 'Y'")->execute($_SESSION["member_login"]));

echo "Edit Profile - $data_member_title[first_name]

$data_member_title[last_name] - pasangiklan.com"; }

(81)

echo "Add My PPC Ad - pasangiklan.com"; }

elseif ($_GET['module'] == 'add_deposit'){ echo "Add Deposit - pasangiklan.com"; }

elseif ($_GET['module'] == 'view-ppc'){

$data_view = $db->database_fetch_array($db->database_prepare("SELECT title FROM as_ppc WHERE ppc_id = ? AND status = 'Y'")->execute($_GET["id"]));

echo "$data_view[title] - pasangiklan.com"; }

elseif ($_GET['module'] == 'edit-ppc'){

$data_view = $db->database_fetch_array($db->database_prepare("SELECT title FROM as_ppc WHERE ppc_id = ? AND status = 'Y'")->execute($_GET["id"]));

echo "Edit $data_view[title] - pasangiklan.com"; }

else{

echo "pasangiklan.com"; }

Referensi

Dokumen terkait

Bapak dan ibu dosen pengampu mata kuliah pada Program Studi Informatikan yang telah memberikan bekal ilmu yang sangat bermanfaat bagi penulis.. Segenap Staf / Karyawan

Oleh karena itu, account Windows Live ini yang dipilih untuk dijadikan account utama, sehingga aplikasi-aplikasi tersebut akan mengakses ke server Windoes Live,seperti terlihat

Aplikasi Drawing Sistem Gugur pada Liga Mahasiswa Taekwondo Berbasis Web bertujuan mempermudah panitia penyelenggara dalam melakukan pengolahan data atlet

Background dari halaman ini adalah permainan pada siang hari dengan tema yang dapat berubah dan terdapat kotak garis sebagai arena permainan seperti yang

Background dari halaman ini adalah permainan pada siang hari dengan tema yang dapat berubah dan terdapat kotak garis sebagai arena permainan seperti yang

DAFTAR ISI

Aplikasi Drawing Sistem Gugur pada Liga Mahasiswa Taekwondo Berbasis Web bertujuan mempermudah panitia penyelenggara dalam melakukan pengolahan data atlet

Data yang telah didapat dari hasil survei kemudian akan diproses melalui bagian penagihan dan selanjutnya akan diterbitkan sebuah laporan tunggakan dan surat