<?php
/* --------------------------------------------------------------
GMGroupIdChecker.php 2009-06-09 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]
--------------------------------------------------------------
*/
/*
* class to manage the group ids of the content managerc ..
*/
class GMGroupIdChecker
{
/*
* actual used languages id
* @var int
*/
var $v_languages_id;
/*
* constructor
* @param int $p_content_group_id
*/
function GMGroupIdChecker($p_languages_id)
{
$this->v_languages_id = $p_languages_id;
return;
}
/*
* check if actual content group id already exists
* @param int $p_content_group_id
* @param int $p_languages_id
* @return boolean
*/
function content_group_id_exist($p_content_group_id, $p_languages_id)
{
$t_content_group_id = gm_prepare_string($p_content_group_id);
$t_languages_id = gm_prepare_string($p_languages_id);
$t_query = xtc_db_query("
SELECT
*
FROM " .
TABLE_CONTENT_MANAGER . "
WHERE
content_group = '" . $t_content_group_id . "'
AND
languages_id = '" . $t_languages_id . "'
");
if((int)xtc_db_num_rows($t_query) > 1)
{
return true;
}
else
{
return false;
}
}
/*
* check if actual content group id already exists
* @param int $p_content_group_id
* @return boolean/int
*/
function suggest_content_group_id($p_languages_id = '')
{
if(empty($p_languages_id))
{
$t_languages_id = $this->v_languages_id;
}
else
{
$t_languages_id = $p_languages_id;
}
$t_query = xtc_db_query("
SELECT
content_group
AS
id
FROM " .
TABLE_CONTENT_MANAGER . "
WHERE
languages_id = '" . $t_languages_id . "'
ORDER BY
content_group
DESC
LIMIT 1
");
if((int)xtc_db_num_rows($t_query) > 0)
{
$t_row = xtc_db_fetch_array($t_query);
$t_content_group_id = $t_row['id'] + 1;
return $t_content_group_id;
}
}
}
| 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----- | |