hledani v carovejch kodech
[mirrors/SokoMan.git] / assistants / set-margin.inc.php
CommitLineData
8ea27618
TM
1<?php
2switch($SUBPATH[0]) {
3 default: case 1:
19cbf1cb 4 echo $this->html->form("$URL/2", 'POST', array(
8ea27618
TM
5 array('margin','40','text',false,'autofocus','margin (%):'),
6 array(false,'SET-MARGIN','submit')
7 ));
8 break;
9 case 2:
19cbf1cb
TM
10 if(isset($_POST['margin'])) {
11 $margin = 1+($_POST['margin']/100);
12 $this->db->safe_query("UPDATE model SET model_price_out = CEIL(model_price_in * $margin)");
13 $this->post_redirect_get("$URL_INTERNAL/1", T('Margin set to').' '.($margin*100-100).'%');
14 }
15 $this->post_redirect_get("$URL_INTERNAL/1","Set-margin: No value passed!", true);
8ea27618
TM
16 break;
17}
This page took 0.144741 seconds and 4 git commands to generate.