-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbannertype.php
130 lines (100 loc) · 3.84 KB
/
bannertype.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
<?php
/*************************************************************************************
Created by G. Papaioannou
You can contact with me at [email protected]
Paradox Interactive (c) 2011,Greece
http://www.paradoxinteractive.gr
**************************************************************************************/
session_start();
include_once 'includes/config.php';
include_once 'includes/functions.php';
include_once 'translations/'.$g_language;
include_once 'includes/login.php';
OpenDB();
if (!check_login() ) {
header( 'Location: index.php' ) ;
}
CloseDB();
?>
<!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>
<title>Select Banner Type</title>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<link href="css/styles.css" rel="stylesheet" type="text/css" />
<link href="css/screen.css" rel="stylesheet" type="text/css" >
</head>
<body class="yui-skin-sam">
<?php include 'includes/navigation.php' ?>
<?php include 'includes/header.php' ?>
<div id="content">
<div id="content-wrap">
<?php
OpenDB();
if (!IsAdminUser())
$UserRestriction = "WHERE cUserID=".get_session("user/id");
$result_id=QueryDB("SELECT cDescription,cID FROM ".GetDBPrefix()."categories ". $UserRestriction." order by cID desc");
$category_data='<option value="-1">---Επιλογή κατηγορίας---</option>';
if ($result_id) {
while ($row=GetResultQueryDB($result_id)) {
$category_data .= '<option value="'.$row['cID'].'">'.$row['cDescription'].'</option>';
}
}
CloseDB();
?>
<div class="welcome">
<h3><?php getTranslation('Banners') ?></h3>
<p><?php getTranslation('BannersType') ?> </p>
<br />
<hr width=100% />
<br />
</div>
<p>
<form method="post" id="customform" >
<fieldset class="general">
<legend>Επιλογή Κατηγορίας</legend>
<div>
<label for="category">*Κατηγορία</label>
<select class="dropdown dd_long" name="categoryid" id="categoryid" size="1">
<?php echo $category_data ?>
</select>
</div>
</fieldset>
</form>
</p>
<div id="col-left" class="cols">
<a href="javascript:submit('editbanner.php?Action=add&Record=-1&Class=text');">
<h3 class="texttype"></h3>
<h3>Κείμενο</h3>
</a>
</div>
<div id="col-mid" class="cols">
<a href="javascript:submit('editbanner.php?Action=add&Record=-1&Class=image');">
<h3 class="imagetype"></h3>
<h3>Εικόνα</h3>
</a>
</div>
<div id="col-right" class="cols">
<a href="javascript:submit('editbanner.php?Action=add&Record=-1&Class=code')">
<h3 class="codetype"></h3>
<h3>Κώδικας</h3>
</a>
</div>
<div class="clear"></div>
</div>
</div>
<?php include 'includes/footer.php' ?>
</body>
</html>
<script LANGUAGE="javascript" TYPE="text/javascript">
function submit(url)
{
with(window.document.forms['customform'])
{
if (categoryid.value=='-1')
alert('Επιλέξτε μια κατηγορία');
else
window.location = url+'&CategoryID='+categoryid.value;
}
}
</script>