2009-05-12 13:40:22 +00:00

42 lines
1.1 KiB
PHP

<?php
/**
* @file
* Sauvegarde le prix du/des pays
*
*/
require_once 'dbbootstrap.php';
require_once 'dbgraydon.php';
if(isset($_REQUEST['immediate'])){
$multiplier = $_REQUEST['immediate'];
$q = Doctrine_Query::create()
->update('Price')
->set('immediate', 'immediate * '.$multiplier);
$q->execute();
header('Location: ../?q=graydon/prix');
}elseif(isset($_REQUEST['normal'])){
$multiplier = $_REQUEST['normal'];
$q = Doctrine_Query::create()
->update('Price')
->set('normal', 'normal * '.$multiplier);
$q->execute();
header('Location: ../?q=graydon/prix');
}elseif(isset($_REQUEST['superflash'])){
$multiplier = $_REQUEST['superflash'];
$q = Doctrine_Query::create()
->update('Price')
->set('superflash', 'superflash * '.$multiplier);
$q->execute();
header('Location: ../?q=graydon/prix');
}elseif(isset($_REQUEST['col'])){
$col = $_REQUEST['col'];
$q = Doctrine_Query::create()
->update('Price')
->set($col, $_REQUEST['value'])
->where('id = ?', $_REQUEST['id']);
$price_id = $q->execute();
print $_REQUEST['value'];
}
?>