From: Thomas Mudrunka Date: Mon, 22 Aug 2011 18:37:23 +0000 (+0200) Subject: Vylepsena podpora carovych kodu X-Git-Url: https://git.harvie.cz/?a=commitdiff_plain;h=8acef003f115dedfe9d130cf306f63f5a0da08c3;p=mirrors%2FSokoMan.git Vylepsena podpora carovych kodu --- diff --git a/assistants/go.inc.php b/assistants/go.inc.php new file mode 100644 index 0000000..c74bbae --- /dev/null +++ b/assistants/go.inc.php @@ -0,0 +1,8 @@ +post_redirect_get($id); + else $this->post_redirect_get('?q='.urlencode($id)); diff --git a/index.php b/index.php index 8f37200..63633b0 100755 --- a/index.php +++ b/index.php @@ -181,7 +181,11 @@ class Sklad_HTML extends HTML {
-
+ + + +
+
@@ -622,7 +626,8 @@ class Sklad_UI { } function post_redirect_get($location, $message='', $error=false) { - $location = $this->html->internal_url($location).'?message='.urlencode($message); + $url_args = $message != '' ? '?message='.urlencode($message) : ''; + $location = $this->html->internal_url($location).$url_args; header('Location: '.$location); if($error) trigger_error($message); $location=htmlspecialchars($location); diff --git a/sklad.conf.php.example b/sklad.conf.php.example index 64a62f2..bd83768 100755 --- a/sklad.conf.php.example +++ b/sklad.conf.php.example @@ -7,11 +7,16 @@ define('DB_DSN', 'mysql:host='.DB_HOST.';dbname='.DB_NAME); define('DIR_HOME', './'); define('DIR_IMAGES', DIR_HOME.'/images'); -define('DIR_TEMPLATES', DIR_HOME.'/templates'); +define('DIR_BARCODES', DIR_HOME.'/barcodes'); +define('DIR_TEMPLATES', DIR_HOME.'/templates'); define('DIR_ASSISTANTS', DIR_HOME.'/assistants'); define('URL_HOME', dirname($_SERVER['SCRIPT_NAME'])); define('URL_IMAGES', URL_HOME.'/images'); +define('URL_BARCODES', URL_HOME.'/barcodes'); + +define('BARCODE_TYPE', 'code128b'); +define('BARCODE_PREFIX', 'STORE/'); $fake_lms_users = array( //You can specify multiple users in this array DB_USER => DB_PASS