forked from bastosmichael/biverr
/
search.php
150 lines (132 loc) · 5.72 KB
/
search.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
<?php
session_start();
?>
<?php
include_once('config/db_conn.php');
include_once('db_config/db_gigs.php');
include_once('db_config/db_user.php');
$user=new user();
$gigs=new gigs();
$query=$_REQUEST['query'];
$rs=$gigs->gigs_search_list($query);
$i=0;
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title><?php echo SITE_TITLE ;?></title>
<link href="css/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="javascript/jquery.min.js"></script>
<script type="text/javascript" src="javascript/jquery.simplemodal.js"></script>
<script type="text/javascript" src="javascript/init.js"></script>
<script type="text/javascript" src="javascript/init1.js"></script>
<script src="javascript/main.js" type="text/javascript"></script>
<script language="javascript" type="text/javascript">
/* this is just a simple reload; you can safely remove it; remember to remove it from the image too */
function reloadCaptcha()
{
document.getElementById('captcha').src = document.getElementById('captcha').src+ '?' +new Date();
}
</script>
<script language="javascript">
function openCenteredWindow(url) {
parms = 'menubar=no,width=600,height=500,toolbar=no'
name = "facebook_share"
height=500
width=600
var left = Math.floor( (screen.width - width) / 2);
var top = Math.floor( (screen.height - height) / 2);
var winParms = "top=" + top + ",left=" + left + ",height=" + height + ",width=" + width;
if (parms) { winParms += "," + parms; }
var win = window.open(url, name, winParms);
if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
return win;
}
</script>
<link type='text/css' href='css/stylesheet.css' rel='stylesheet' media='screen' />
<link type='text/css' href='css/basic.css' rel='stylesheet' media='screen' />
</head>
<body>
<div id="container">
<!--HEADER AREA-->
<?php include('header.php')?>
<!--HEADER AREA END-->
<div class="body_cont">
<div class="body_cont_top">
</div>
<div class="body_cont_center">
<div class="left_cont">
<h1>
</h1>
<div class="tweet_bx">
<div class="tweet_gig_bx_left">
<br />
<b>Search again</b>
<br />
<form method="post" id="create_gigs" enctype="multipart/form-data" action="search.php">
<table width="100%" border="0" cellspacing="0" cellpadding="0" >
<tr height="40" >
<td width="10%" class="style1"> </td>
<td width="70%" align="right"><input type="text" value="<?php echo $query; ?>" size="30" name="query" id="gigs_title" class="text-title"><input height="32" type="image" src="images/btn-go.gif" class="btn-update" alt="Update"></td>
<td width="20%"> </td>
</tr>
</table>
</form>
</div>
</div>
<div class="results-bar" >
<span > Search Results for <strong><?php echo $query; ?></strong></span>
</div>
<?php
while($data=mysql_fetch_array($rs))
{
$rs_user=$user->uniq_user_list('user_id',$data['user_id']);
$data_user=mysql_fetch_array($rs_user);
?>
<div class="tweet_bx">
<a href="users_<?php echo $data_user['user_name']; ?>_gigs_<?php echo str_replace(' ','-', $data['gigs_title']);?>">
<img src="gigsimg/<?php
if($data['gigs_image'])
echo $data['gigs_image'];
else echo 'no_img.jpg';
?>" height="72" width="101" /></a>
<div class="tweet_bx_left">
<p>
<b><span style="cursor:pointer;" onclick="javascript:location.href='users_<?php echo $data_user['user_name']; ?>_gigs_<?php echo str_replace(' ','-', $data['gigs_title']);?>'">I will <?php echo $data['gigs_title'];?> for <?php echo SITE_AMMOUNT;?>.</span></b> <br />
<?php echo substr($data['gigs_description'],0,50);?>... (by user)<br />
</p>
<div class="tweet_bx_b">
<i> <a href="users_<?php echo $data_user['user_name']; ?>_gigs_<?php echo str_replace(' ','-', $data['gigs_title']);?>">Read more</a></i><img src="images/tw_brd.jpg" /><div class="list-controllers">
<ul class="gig-controls">
<li><a href="#" class="pshare share-link">Share</a></li>
<li class="p-share" style="display: none;">
<a href="#" onClick="openCenteredWindow('http://www.facebook.com/sharer.php?u=<?php echo 'http://'.$_SERVER['HTTP_HOST'];?>/users_<?php echo $data_user['user_name']; ?>_gigs_<?php echo str_replace(' ','-', $data['gigs_title']); ?>');"><img alt="Btn-facebook" src="images/btn-facebook.png" /></a>
<a href="http://www.twitter.com/?status=<?php echo $data_user['user_name']; ?>:<?php echo str_replace(' ','+', $data['gigs_title']);?>+<?php echo "http://".$_SERVER['HTTP_HOST']; ?>/users_<?php echo $data_user['user_name']; ?>_gigs_<?php echo str_replace(' ','-', $data['gigs_title']);?>" target="_blank" title="post to twitter"><img alt="Btn-twitter" src="images/btn-twitter.png"></a>
<a href="mailto:<?php echo $data_user['user_primary_email']; ?>?subject=<?php echo str_replace(' ','%20', $data['gigs_title']);?>&body=Hi,%0A%0ACheck%20it%20out:%20<?php echo "http://".$_SERVER['HTTP_HOST']; ?>/users_<?php echo $data_user['user_name']; ?>_gigs_<?php echo str_replace(' ','-', $data['gigs_title']);?>" target="_blank" title="send by email"><img alt="Btn-email" src="images/btn-email.png"></a></li>
</ul>
</div>
</div>
</div>
<div class="btn"><a href="users_<?php echo $data_user['user_name']; ?>_gigs_<?php echo str_replace(' ','-', $data['gigs_title']);?>">
<img src="images/or_bt.jpg" /></a>
</div>
</div>
<?php
}
?>
<div class="tweet_bx">
<div class="tweet_bx_left"></div>
</div>
</div>
<?php include('right.php'); ?>
</div>
<div class="body_cont_bottom">
</div>
</div>
<?php
include('footer.php');
?>
</div>
</body>
</html>