Ajout intersud

This commit is contained in:
Michael RICOIS 2009-05-14 09:59:52 +00:00
parent f41d4c9602
commit a1f35b2f57
5 changed files with 131 additions and 17 deletions

View File

@ -0,0 +1,98 @@
<?php
$tabPays = array(
"Algeria" => array( "display"=> "Algeria"),
"Argentina" => array( "display"=> "Argentina"),
"Australia" => array( "display"=> "Australia"),
"Austria" => array( "display"=> "Austria"),
"Azerbaijan" => array( "display"=> "Azerbaijan"),
"Bahrain" => array( "display"=> "Bahrain"),
"Bangladesh" => array( "display"=> "Bangladesh"),
"Belgium" => array( "display"=> "Belgium"),
"Bolivia" => array( "display"=> "Bolivia"),
"Brazil" => array( "display"=> "Brazil"),
"Bulgaria" => array( "display"=> "Bulgaria"),
"Cambodia" => array( "display"=> "Cambodia"),
"Cameroon" => array( "display"=> "Cameroon"),
"Canada" => array( "display"=> "Canada"),
"Chile" => array( "display"=> "Chile"),
"China" => array( "display"=> "China"),
"Colombia" => array( "display"=> "Colombia"),
"Congo Republic" => array( "display"=> "Congo Republic"),
"Croatia" => array( "display"=> "Croatia"),
"Cyprus" => array( "display"=> "Cyprus"),
"Czech Republic" => array( "display"=> "Czech Republic"),
"Denmark" => array( "display"=> "Denmark"),
"Ecuador" => array( "display"=> "Ecuador"),
"Egypt" => array( "display"=> "Egypt"),
"Estonia" => array( "display"=> "Estonia"),
"Finland" => array( "display"=> "Finland"),
"France" => array( "display"=> "France"),
"Gabon" => array( "display"=> "Gabon"),
"Germany" => array( "display"=> "Germany"),
"Greece" => array( "display"=> "Greece"),
"Guadeloupe" => array( "display"=> "Guadeloupe"),
"Honduras" => array( "display"=> "Honduras"),
"Hungary" => array( "display"=> "Hungary"),
"India" => array( "display"=> "India"),
"Indonesia" => array( "display"=> "Indonesia"),
"Iran" => array( "display"=> "Iran"),
"Irish Republic" => array( "display"=> "Irish Republic"),
"Israel" => array( "display"=> "Israel"),
"Italy" => array( "display"=> "Italy"),
"Ivory Coast" => array( "display"=> "Ivory Coast"),
"Japan" => array( "display"=> "Japan"),
"Jordan" => array( "display"=> "Jordan"),
"Kuwait" => array( "display"=> "Kenya"),
"Kyrgyzstan" => array( "display"=> "Kyrgyzstan"),
"Latvia" => array( "display"=> "Latvia"),
"Lebanon" => array( "display"=> "Lebanon"),
"Lithuania" => array( "display"=> "Lithuania"),
"Luxembourg" => array( "display"=> "Luxembourg"),
"Malaysia" => array( "display"=> "Malaysia"),
"Malta" => array( "display"=> "Malta"),
"Mexico" => array( "display"=> "Mexico"),
"Monaco" => array( "display"=> "Monaco"),
"Morocco" => array( "display"=> "Morocco"),
"Netherlands" => array( "display"=> "Netherlands"),
"New Zealand" => array( "display"=> "New Zealand"),
"Nigeria" => array( "display"=> "Nigeria"),
"Norway" => array( "display"=> "Norway"),
"Oman" => array( "display"=> "Oman"),
"Pakistan" => array( "display"=> "Pakistan"),
"Paraguay" => array( "display"=> "Paraguay"),
"Peru" => array( "display"=> "Peru"),
"Philippines" => array( "display"=> "Philippines"),
"Poland" => array( "display"=> "Poland"),
"Portugal" => array( "display"=> "Portugal"),
"Qatar" => array( "display"=> "Qatar"),
"Romania" => array( "display"=> "Romania"),
"Russia" => array( "display"=> "Russia"),
"Saudi Arabia" => array( "display"=> "Saudi Arabia"),
"Serbia And Montenegro" => array( "display"=> "Serbia And Montenegro"),
"Seychelles" => array( "display"=> "Seychelles"),
"Singapore" => array( "display"=> "Singapore"),
"Slovakia" => array( "display"=> "Slovakia"),
"Slovenia" => array( "display"=> "Slovenia"),
"South Africa" => array( "display"=> "South Africa"),
"South Korea" => array( "display"=> "South Korea"),
"Spain" => array( "display"=> "Spain"),
"Sri Lanka" => array( "display"=> "Sri Lanka"),
"Sweden" => array( "display"=> "Sweden"),
"Switzerland" => array( "display"=> "Switzerland"),
"Syria" => array( "display"=> "Syria"),
"Taiwan" => array( "display"=> "Taiwan"),
"Thailand" => array( "display"=> "Thailand"),
"Trinidad And Tobago" => array( "display"=> "Trinidad And Tobago"),
"Tunisia" => array( "display"=> "Tunisia"),
"Turkey" => array( "display"=> "Turkey"),
"Ukraine" => array( "display"=> "Ukraine"),
"United Arab Emirates" => array( "display"=> "United Arab Emirates"),
"United Kingdom" => array( "display"=> "United Kingdom"),
"Uruguay" => array( "display"=> "Uruguay"),
"USA" => array( "display"=> "USA"),
"Venezuela" => array( "display"=> "Venezuela"),
"Vietnam" => array( "display"=> "Vietnam"),
"Yemen" => array( "display"=> "Yemen"),
);
?>

View File

@ -18,4 +18,13 @@
<li><a href="./?q=graydon/traduc">Ajout et modification des traductions</a></li>
</ul>
</li>
</ul>
<li>Intersud
<ul class="submenu">
<li><a href="./?q=intersud/pays">Liste des pays</a></li>
<li><a href="./?q=intersud/commandes">Liste des commandes</a></li>
</ul>
</li>
</ul>

View File

@ -1,12 +1,8 @@
<?php
$view = arg(1,$_REQUEST['q']);
switch($view){
case 'pays':
require_once realpath(dirname(__FILE__)).'/pays.php';
break;
case 'prix':
require_once realpath(dirname(__FILE__)).'/price.php';
break;
}
?>

View File

@ -5,17 +5,17 @@
*
*/
setDbConn('intersud');
$q = Doctrine_Query::create()
->select('*')
->from('Country');
->from('Country c')
->leftJoin('c.Price p, c.Delais d')
->setHydrationMode(Doctrine::HYDRATE_ARRAY);
$results = $q->execute();
$results = $results->toArray();
$firephp->log($results, 'results');
?>
<script>
$(document).ready(function() {
$('.status').editable('./modules/graydon/payssave.php', {
$('.status').editable('./modules/intersud/payssave.php', {
data : "{'actif':'actif','inactif':'incatif'}",
type : 'select',
event : 'dblclick',
@ -23,13 +23,13 @@ $(document).ready(function() {
tooltip : 'Double-Clique pour éditer...',
submitdata : {col: 'status'}
});
$('.lib').editable('./modules/graydon/payssave.php', {
$('.lib').editable('./modules/intersud/payssave.php', {
event : 'dblclick',
indicator : 'Sauvegarde...',
tooltip : 'Double-Clique pour éditer...',
submitdata : {col: 'lib'}
});
$('.code').editable('./modules/graydon/payssave.php', {
$('.code').editable('./modules/intersud/payssave.php', {
event : 'dblclick',
indicator : 'Sauvegarde...',
tooltip : 'Double-Clique pour éditer...',
@ -39,20 +39,34 @@ $(document).ready(function() {
</script>
<table>
<tr>
<th colspan="4">Information Pays</th>
<th colspan="2">Prix</th>
<th colspan="2">Délais</th>
</tr>
<tr>
<th>Libélé</th>
<th>Pays</th>
<th>Code</th>
<th>Status</th>
<th>Normal</th>
<th>Rapide</th>
<th>Normal</th>
<th>Rapide</th>
</tr>
<?php
foreach($results as $pays){
?>
<tr>
<td align="center"><div id="<?php print $pays['id']; ?>" class="lib"><?php print $pays['lib'];?></div></td>
<td align="center"><div id="<?php print $pays['id']; ?>" class="graydon_country"><?php print $pays['graydon_country'];?></div></td>
<td align="center"><div id="<?php print $pays['id']; ?>" class="graydon_country"><?php print $pays['intersud_country'];?></div></td>
<td align="center"><div id="<?php print $pays['id']; ?>" class="code"><?php print $pays['code'];?></div></td>
<td align="center"><div id="<?php print $pays['id']; ?>" class="status"><?php print $pays['status'];?></div></td>
<td><?php print $pays['Price']['normal'];?></td>
<td><?php print $pays['Price']['rapide'];?></td>
<td><?php print $pays['Delais']['normalDe'].' à '.$pays['Delais']['normalA'].' Jours';?></td>
<td><?php print $pays['Delais']['rapideDe'].' à '.$pays['Delais']['rapideA'].' Jours';?></td>
</tr>
<?php
}

View File

@ -1,3 +0,0 @@
<?php
?>