<?php
/* --------------------------------------------------------------
GMIdStarts.php 2008-08-10 gambio
Gambio OHG
http://www.gambio.de
Copyright (c) 2008 Gambio OHG
Released under the GNU General Public License (Version 2)
[http://www.gnu.org/licenses/gpl-2.0.html]
--------------------------------------------------------------
*/
?><?php
class GMIdStarts {
function GMIdStarts() {
return;
}
function get_last_orders_id(){
$orders_id = array();
$get_orders_id = xtc_db_query("SELECT orders_id FROM orders ORDER BY orders_id DESC LIMIT 1");
if(mysql_num_rows($get_orders_id) == 1){
$orders_id = xtc_db_fetch_array($get_orders_id);
}
else $orders_id['orders_id'] = 1;
return $orders_id['orders_id'];
}
function get_last_customers_id(){
$customers_id = array();
$get_customers_id = xtc_db_query("SELECT customers_id FROM customers ORDER BY customers_id DESC LIMIT 1");
if(mysql_num_rows($get_customers_id) == 1){
$customers_id = xtc_db_fetch_array($get_customers_id);
}
else $customers_id['customers_id'] = 1;
return $customers_id['customers_id'];
}
function get_orders_autoindex(){
$orders_autoindex = 1;
$get_current_autoindex = xtc_db_query("SHOW TABLE STATUS LIKE 'orders'");
if(mysql_num_rows($get_current_autoindex) == 1){
$row = xtc_db_fetch_array($get_current_autoindex);
$orders_autoindex = $row['Auto_increment'];
}
return $orders_autoindex;
}
function get_customers_autoindex(){
$customers_autoindex = 1;
$get_current_autoindex = xtc_db_query("SHOW TABLE STATUS LIKE 'customers'");
if(mysql_num_rows($get_current_autoindex) == 1){
$row = xtc_db_fetch_array($get_current_autoindex);
$customers_autoindex = $row['Auto_increment'];
}
return $customers_autoindex;
}
function set_next_orders_id($next_id){
$success = false;
if(is_numeric($next_id) && $next_id >= $this->get_last_orders_id()){
xtc_db_query("ALTER TABLE orders AUTO_INCREMENT = " . (int)$next_id . "");
$success = true;
}
return $success;
}
function set_next_customers_id($next_id){
$success = false;
if(is_numeric($next_id) && $next_id >= $this->get_last_customers_id()){
xtc_db_query("ALTER TABLE customers AUTO_INCREMENT = " . (int)$next_id . "");
$success = true;
}
return $success;
}
}
?>| nama | waktu | ukuran | owner | perm | aksi |
|---|---|---|---|---|---|
| .. | |||||
| GMAltText.php | 2013-11-12 20:53 | 2.55 KB | 76129f60960:kunden | -xw-x----- | |
| GMGroupIdChecker.php | 2013-11-12 20:53 | 2.33 KB | 76129f60960:kunden | -xw-x----- | |
| GMIdStarts.php | 2013-11-12 20:53 | 2.52 KB | 76129f60960:kunden | -xw-x----- | |
| GMInvoicing.php | 2013-11-12 20:53 | 10.88 KB | 76129f60960:kunden | -xw-x----- | |
| GMInvoicingConfiguration.php | 2013-11-12 20:53 | 6.39 KB | 76129f60960:kunden | -xw-x----- | |
| GMLangFileImport.php | 2013-11-12 20:53 | 795 B | 76129f60960:kunden | -xw-x----- | |
| GMModulesManager.php | 2013-11-12 20:53 | 13.34 KB | 76129f60960:kunden | -xw-x----- | |
| GMOpenSearch.php | 2013-11-12 20:53 | 4.09 KB | 76129f60960:kunden | -xw-x----- | |
| GMOrderFormat.php | 2013-11-12 20:53 | 4.09 KB | 76129f60960:kunden | -xw-x----- | |
| GMProductExport.php | 2013-11-12 20:53 | 56.76 KB | 76129f60960:kunden | -xw-x----- | |
| GMProductUpload.php | 2013-11-12 20:53 | 7.9 KB | 76129f60960:kunden | -xw-x----- | |
| GMSitemapXML.php | 2013-11-12 20:53 | 15.42 KB | 76129f60960:kunden | -xw-x----- | |
| GMStart.php | 2013-11-12 20:53 | 11.6 KB | 76129f60960:kunden | -xw-x----- | |
| GMStat.php | 2013-11-12 20:53 | 19.62 KB | 76129f60960:kunden | -xw-x----- | |
| GMUpload.php | 2013-11-12 20:53 | 5.52 KB | 76129f60960:kunden | -xw-x----- | |
| ShowLogs.php | 2013-11-12 20:53 | 7.29 KB | 76129f60960:kunden | -xw-x----- | |
| gmOrderPDF.php | 2013-11-12 20:53 | 26.84 KB | 76129f60960:kunden | -xw-x----- | |
| gmPDF.php | 2013-11-12 20:53 | 13.37 KB | 76129f60960:kunden | -xw-x----- | |