[go: up one dir, main page]

Menu

[r19]: / customer_call_back.php  Maximize  Restore  History

Download this file

157 lines (126 with data), 5.0 kB

  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
151
152
153
154
155
156
<?php //require('includes/application_top.php') ;
/*
$Id: customer_call_back.php, v 0.1 23/07/2008 Delete Exp $
This script is not included in the original version of osCommerce
osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com
Credits to : scriptaculo.us, http://www.cssplay.co.uk (Stu Nicholls)
Copyright (c) 2003 osCommerce
Released under the GNU General Public License
*/
// Obtenir une liste de date de disponibilit� du centre d'appel en fonction des dates et heures
//
function getNextDays()
{
$now = time() ;
$one_day = 3600 * 24 ;
$date_format = "%A %d %B %Y" ;
$timestamp = $now ;
// Heure Limite � partir de laquelle on repousse le rappel � demain
//
if( strftime("%H", $timestamp) > CUSTOMER_CALL_BACK_REQUEST_HOUR_LIMIT ) $now += $one_day ;
for($i=0, $out_date = array(), $days = 7 ; $i < $days ; $i++)
{
$timestamp = $now + $one_day * $i;
// Exclusion des jours ferm�s
//
if ( strstr(CUSTOMER_CALL_BACK_ALLOWED_DAYS, strftime("%u", $timestamp)) ) $days++ ;
else
{
$out_date[$timestamp] = strftime($date_format, $timestamp) ;
$out_date[$timestamp] = ucwords($out_date[$timestamp]);
}
}
return($out_date) ;
}
?>
<div id="customer_call_back_window">
<div id="xsnazzy">
<b class="xtop"><b class="xb1"></b><b class="xb2"></b><b class="xb3"></b><b class="xb4"></b></b>
<div class="xboxcontent">
<INPUT type="hidden" id="warn_name" value="<?php echo CUSTOMER_CALL_BACK_WARN_NAME ?>" />
<INPUT type="hidden" id="warn_lastname" value="<?php echo CUSTOMER_CALL_BACK_WARN_LASTNAME ?>" />
<INPUT type="hidden" id="warn_phone" value="<?php echo CUSTOMER_CALL_BACK_WARN_PHONE ?>" />
<form action="javascript:get(document.getElementById('myform'));" name="myform" id="myform">
<!-- Formulaire de contact -->
<table width="100%" border="0">
<tr><td><H1><?php echo CUSTOMER_CALL_BACK_HEADING_TITLE ; ?></H1></td><td><a href="javascript:void(0);" = 'hidden';"><?php echo CUSTOMER_CALL_BACK_CLOSE ; ?></a></td></tr></table>
<hr />
<p>
<?php echo CUSTOMER_CALL_BACK_HEADING_TEXT ; ?>
</p>
<hr />
<table border="0" class="xboxform" width="100%">
<tr>
<td><?php echo CUSTOMER_CALL_BACK_TEXT_FORM_GENDER ; ?></td>
<td><SELECT id="gender">
<OPTION VALUE="1"><?php echo CUSTOMER_CALL_BACK_TEXT_FORM_GENDER_MALE ; ?></OPTION>
<OPTION VALUE="2"><?php echo CUSTOMER_CALL_BACK_TEXT_FORM_GENDER_FEMALE ; ?></OPTION>
</SELECT>
</td>
</tr>
<tr>
<td><?php echo CUSTOMER_CALL_BACK_TEXT_FORM_NAME ; ?></td>
<td><INPUT type=text id="name" size="30" /></td>
</tr>
<tr>
<td><?php echo CUSTOMER_CALL_BACK_TEXT_FORM_LASTNAME; ?></td>
<td><INPUT type=text id="lastname" size="30" /></td>
</tr>
<tr>
<td><?php echo CUSTOMER_CALL_BACK_TEXT_FORM_PHONE ; ?></td>
<td><INPUT type=text id="phone" size="15" /> <a class="main"><?php echo CUSTOMER_CALL_BACK_TEXT_FORM_PHONE_INFO ; ?></a></td>
</tr>
<tr>
<td colspan=2><br /><?php echo CUSTOMER_CALL_BACK_TEXT_FORM_MESSAGE ; ?></td>
<tr>
<td colspan="2"> <textarea rows="3" id="message"></textarea></td>
</tr>
<tr>
<td colspan=2> <?php echo CUSTOMER_CALL_BACK_TEXT_FORM_WISHED_DATE ; ?> </td></tr>
<tr><td colspan=2 align="center">
<SELECT id="date">
<?php
foreach(getNextDays() as $timestamp => $day)
{
printf('<OPTION VALUE="%s">%s</OPTION>', $timestamp, $day) ;
}
?>
</SELECT>
<SELECT id="hour">
<?php
$hours_ranges = explode(";", CUSTOMER_CALL_BACK_TEXT_WHISHED_HOUR) ;
foreach($hours_ranges as $id => $hour_range)
{
preg_match("/#([A-Za-z0-9=\"\.\- \t]*)#(.*)/", $hour_range, $select_options);
if ( strlen($select_options[2]) ) $hour_range = $select_options[2] ;
printf('<OPTION VALUE="%s" %s>%s</OPTION>', $id, $select_options[1], $hour_range) ;
}
?>
</SELECT>
</td></tr>
<tr>
<td align="left"><input type="button" name="button" value="<?php echo CUSTOMER_CALL_BACK_CLOSE ; ?>" = 'hidden';"></td>
<td align="right">
<input type="button" name="button" value="<?php echo CUSTOMER_CALL_BACK_SUBMIT ; ?>" />
</td>
</tr>
</form>
</table>
<!-- R�ponse AJAX de customer_call_back_process.php -->
<span id="response"></span>
<!-- R�ponse AJAX de customer_call_back_process.php [EOF]-->
</div>
<b class="xbottom"><b class="xb4"></b><b class="xb3"></b><b class="xb2"></b><b class="xb1"></b></b>
</div>
<!-- Formulaire de contact / EOF -->
</div>
<script type="text/javascript">
var customer_call_back_window = document.getElementById('customer_call_back_window');
if(customer_call_back_window)
{
new Draggable('customer_call_back_window');
}
</script>
<!-- </body> -->
<!-- <?php // if ( $hidethis) echo '<script>setTimeout(\'hide()\',5000)</script>' ; ?> !-->