本文整理汇总了PHP中_dbQuery函数的典型用法代码示例。如果您正苦于以下问题:PHP _dbQuery函数的具体用法?PHP _dbQuery怎么用?PHP _dbQuery使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了_dbQuery函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: phpwcms_revision_r502
function phpwcms_revision_r502()
{
$status = true;
// do former revision check – fallback to r497
if (phpwcms_revision_check_temp('497') !== true) {
$status = phpwcms_revision_check('497');
}
// add field for default language type and target ID to article, category
$result = _dbQuery("SHOW COLUMNS FROM " . DB_PREPEND . "phpwcms_articlecat LIKE 'acat_lang_type'", 'COUNT_SHOW');
if (empty($result)) {
$result = _dbQuery("ALTER TABLE " . DB_PREPEND . "phpwcms_articlecat ADD acat_lang_type VARCHAR(255) NOT NULL DEFAULT ''", 'ALTER');
_dbQuery("ALTER TABLE " . DB_PREPEND . "phpwcms_articlecat ADD INDEX (acat_lang_type)", 'ALTER');
}
$result = _dbQuery("SHOW COLUMNS FROM " . DB_PREPEND . "phpwcms_articlecat LIKE 'acat_lang_id'", 'COUNT_SHOW');
if (empty($result)) {
$result = _dbQuery("ALTER TABLE " . DB_PREPEND . "phpwcms_articlecat ADD acat_lang_id INT(11) unsigned NOT NULL DEFAULT '0'", 'ALTER');
_dbQuery("ALTER TABLE " . DB_PREPEND . "phpwcms_articlecat ADD INDEX (acat_lang_id)", 'ALTER');
}
$result = _dbQuery("SHOW COLUMNS FROM " . DB_PREPEND . "phpwcms_article LIKE 'article_lang_type'", 'COUNT_SHOW');
if (empty($result)) {
$result = _dbQuery("ALTER TABLE " . DB_PREPEND . "phpwcms_article ADD article_lang_type VARCHAR(255) NOT NULL DEFAULT ''", 'ALTER');
_dbQuery("ALTER TABLE " . DB_PREPEND . "phpwcms_article ADD INDEX (article_lang_type)", 'ALTER');
}
$result = _dbQuery("SHOW COLUMNS FROM " . DB_PREPEND . "phpwcms_article LIKE 'article_lang_id'", 'COUNT_SHOW');
if (empty($result)) {
$result = _dbQuery("ALTER TABLE " . DB_PREPEND . "phpwcms_article ADD article_lang_id INT(11) unsigned NOT NULL DEFAULT '0'", 'ALTER');
_dbQuery("ALTER TABLE " . DB_PREPEND . "phpwcms_article ADD INDEX (article_lang_id)", 'ALTER');
}
return $status;
}
示例2: phpwcms_revision_r535
function phpwcms_revision_r535()
{
$status = true;
// do former revision check – fallback to r534
if (phpwcms_revision_check_temp('534') !== true) {
$status = phpwcms_revision_check('534');
}
// change type of some content related fields from TEXT to MEDIUMTEXT
// Retrieve Type of profession name
$result = _dbQuery("SHOW COLUMNS FROM `" . DB_PREPEND . "phpwcms_profession` WHERE Field='prof_name'");
if (isset($result[0]['Type']) && strpos($result[0]['Type'], '100')) {
$update = _dbQuery("ALTER TABLE `" . DB_PREPEND . "phpwcms_profession` CHANGE `prof_name` `prof_name` VARCHAR(255) NOT NULL DEFAULT ''", 'ALTER');
if (!$update) {
$status = false;
}
}
// Change profession ' n/a'
_dbUpdate('phpwcms_profession', array('prof_name' => 'n/a'), "prof_name=' n/a'");
// Import new professions
$result = _dbCount("SELECT COUNT(*) FROM `" . DB_PREPEND . "phpwcms_profession`");
if ($result < 25) {
$jobs = array('academic', 'accountant', 'actor', 'administrative services department manager', 'administrator', 'administrator, IT', 'agricultural advisor', 'air steward', 'air-conditioning installer or mechanic', 'aircraft service technician', 'ambulance driver (non paramedic)', 'animal carer (not in farms)', 'animator', 'arable farm manager, field crop or vegetable', 'arable farmer, field crop or vegetable', 'architect', 'architect, landscape', 'artist', 'asbestos removal worker', 'assembler', 'assembly team leader', 'assistant', 'author', 'baker', 'bank clerk (back-office)', 'beauty therapist', 'beverage production process controller', 'biologist', 'blogger', 'boring machine operator', 'bricklayer', 'builder', 'butcher', 'car mechanic', 'career counsellor', 'caretaker', 'carpenter', 'charge nurse', 'check-out operator', 'chef', 'child-carer', 'civil engineering technician', 'civil servant', 'cleaning supervisor', 'clerk', 'climatologist', 'cloak room attendant', 'cnc operator', 'comic book writer', 'community health worker', 'company director', 'computer programmer', 'confectionery maker', 'construction operative', 'cook', 'cooling or freezing installer or mechanic', 'critic', 'database designer', 'decorator', 'dental hygienist', 'dental prosthesis technician', 'dentist', 'department store manager', 'designer', 'designer, graphic', 'designer, industrial', 'designer, interface', 'designer, interior', 'designer, screen', 'designer, web', 'dietician', 'diplomat', 'director', 'display designer', 'doctor', 'domestic housekeeper', 'economist', 'editor', 'education advisor', 'electrical engineer', 'electrical mechanic or fitter', 'electrician', 'engineer', 'engineering maintenance supervisor', 'estate agent', 'executive', 'executive secretary', 'farmer', 'felt roofer', 'filing clerk', 'film director', 'financial clerk', 'financial services manager', 'fire fighter', 'first line supervisor beverages workers', 'first line supervisor of cleaning workers', 'fisherman', 'fishmonger', 'flight attendant', 'floral arranger', 'food scientist', 'garage supervisor', 'garbage man', 'gardener, all other', 'general practitioner', 'geographer', 'geologist', 'hairdresser', 'head groundsman', 'head teacher', 'horse riding instructor', 'hospital nurse', 'hotel manager', 'house painter', 'hr manager', 'it applications programmer', 'it systems administrator', 'jeweller', 'journalist', 'judge', 'juggler', 'kitchen assistant', 'lathe setter-operator', 'lawyer', 'lecturer', 'legal secretary', 'lexicographer', 'library assistant', 'local police officer', 'logistics manager', 'machine tool operator', 'magician', 'makeup artist', 'manager', 'manager, all other health services', 'marketing manager', 'meat processing operator', 'mechanical engineering technician', 'medical laboratory technician', 'medical radiography equipment operator', 'metal moulder', 'metal production process operator', 'meteorologist', 'midwifery professional', 'miner', 'mortgage clerk', 'musical instrument maker', 'musician', 'non-commissioned officer armed forces', 'nurse', 'nursery school teacher', 'nursing aid', 'ophthalmic optician', 'optician', 'painter', 'payroll clerk', 'personal assistant', 'personal carer in an institution for the elderly', 'personal carer in an institution for the handicapped', 'personal carer in private homes', 'personnel clerk', 'pest controller', 'photographer', 'physician assistant', 'pilot', 'pipe fitter', 'plant maintenance mechanic', 'plumber', 'police inspector', 'police officer', 'policy advisor', 'politician', 'porter', 'post secondary education teacher', 'post sorting or distributing clerk', 'power plant operator', 'primary school head', 'primary school teacher', 'printer', 'printing machine operator', 'prison officer / warder', 'product manager', 'professional gambler', 'project manager', 'programmer', 'psychologist', 'puppeteer', 'quality inspector, all other products', 'receptionist', 'restaurant cook', 'road paviour', 'roofer', 'sailor', 'sales assistant, all other', 'sales or marketing manager', 'sales representative', 'sales support clerk', 'salesperson', 'scientist', 'seaman (armed forces)', 'secondary school manager', 'secondary school teacher', 'secretary', 'security guard', 'sheet metal worker', 'ship mechanic', 'shoe repairer, leather repairer', 'shop assistant', 'sign language Interpreter', 'singer', 'social media manager', 'social photographer', 'software analyst', 'software developer', 'software engineer', 'soldier', 'solicitor', 'speech therapist', 'steel fixer', 'stockman', 'structural engineer', 'student', 'surgeon', 'surgical footwear maker', 'swimming instructor', 'system operator', 'tailor', 'tailor, seamstress', 'tax inspector', 'taxi driver', 'teacher', 'telephone operator', 'telephonist', 'theorist', 'tile layer', 'translator', 'transport clerk', 'travel agency clerk', 'travel agent', 'truck driver long distances', 'trucker', 'TV cameraman', 'TV presenter', 'university professor', 'university researcher', 'vet', 'veterinary practitioner', 'vocational education teacher', 'waiter', 'waiting staff', 'web designer', 'web developer', 'webmaster', 'welder, all other', 'wood processing plant operator', 'writer', 'other', 'n/a');
foreach ($jobs as $job) {
$sql = 'INSERT IGNORE INTO `' . DB_PREPEND . 'phpwcms_profession` (prof_name) VALUES(' . _dbEscape($job) . ')';
_dbQuery($sql, 'INSERT');
}
}
return $status;
}
示例3: phpwcms_revision_r403
function phpwcms_revision_r403()
{
$status = true;
// do former revision check
// r402 required no action, so fallback to r401
$r401 = '401';
if (phpwcms_revision_check_temp($r401) !== true) {
$status = phpwcms_revision_check($r401);
}
// check if article content tab field exists
$result = _dbQuery("SHOW COLUMNS FROM " . DB_PREPEND . "phpwcms_articlecontent LIKE 'acontent_tab'", 'COUNT_SHOW');
if (empty($result)) {
$result = _dbQuery("ALTER TABLE " . DB_PREPEND . "phpwcms_articlecontent ADD acontent_tab VARCHAR(255) NOT NULL DEFAULT ''", 'ALTER');
}
// check if new structure level class field exists
$result = _dbQuery("SHOW COLUMNS FROM " . DB_PREPEND . "phpwcms_articlecat LIKE 'acat_class'", 'COUNT_SHOW');
if (empty($result)) {
$result = _dbQuery("ALTER TABLE " . DB_PREPEND . "phpwcms_articlecat ADD acat_class VARCHAR(255) NOT NULL DEFAULT ''", 'ALTER');
}
// check if new structure level keywords field exists
$result = _dbQuery("SHOW COLUMNS FROM " . DB_PREPEND . "phpwcms_articlecat LIKE 'acat_keywords'", 'COUNT_SHOW');
if (empty($result)) {
$result = _dbQuery("ALTER TABLE " . DB_PREPEND . "phpwcms_articlecat ADD acat_keywords VARCHAR(255) NOT NULL DEFAULT ''", 'ALTER');
}
// upgrade sysvalue fields
$result = _dbQuery("SHOW COLUMNS FROM " . DB_PREPEND . "phpwcms_sysvalue LIKE 'sysvalue_vartype'");
if (isset($result[0]['Type']) && $result[0]['Type'] == 'varchar(100)') {
$result = _dbQuery("ALTER TABLE " . DB_PREPEND . "phpwcms_sysvalue CHANGE sysvalue_vartype sysvalue_vartype VARCHAR(255) NOT NULL DEFAULT ''", 'ALTER');
}
$result = _dbQuery("SHOW COLUMNS FROM " . DB_PREPEND . "phpwcms_sysvalue LIKE 'sysvalue_value'");
if (isset($result[0]['Type']) && $result[0]['Type'] == 'text') {
$result = _dbQuery("ALTER TABLE " . DB_PREPEND . "phpwcms_sysvalue CHANGE sysvalue_value sysvalue_value MEDIUMTEXT NOT NULL", 'ALTER');
}
return $status;
}
示例4: phpwcms_revision_r414
function phpwcms_revision_r414()
{
$status = true;
// Test against new shopping module fields
$result = _dbQuery("SHOW TABLES LIKE '" . DB_PREPEND . "phpwcms_shop_products'");
if (!empty($result)) {
$result = _dbQuery("SHOW COLUMNS FROM " . DB_PREPEND . "phpwcms_shop_products LIKE 'shopprod_special_price'");
if (empty($result)) {
$result = _dbQuery("ALTER TABLE " . DB_PREPEND . "phpwcms_shop_products ADD shopprod_special_price TEXT NOT NULL", 'ALTER');
}
$result = _dbQuery("SHOW COLUMNS FROM " . DB_PREPEND . "phpwcms_shop_products LIKE 'shopprod_track_view'");
if (empty($result)) {
$result = _dbQuery("ALTER TABLE " . DB_PREPEND . "phpwcms_shop_products ADD shopprod_track_view INT(11) NOT NULL DEFAULT '0'", 'ALTER');
$result = _dbQuery("ALTER TABLE " . DB_PREPEND . "phpwcms_shop_products ADD INDEX (shopprod_track_view)", 'ALTER');
}
$result = _dbQuery("SHOW COLUMNS FROM " . DB_PREPEND . "phpwcms_shop_products LIKE 'shopprod_lang'");
if (empty($result)) {
$result = _dbQuery("ALTER TABLE " . DB_PREPEND . "phpwcms_shop_products ADD shopprod_lang VARCHAR(255) NOT NULL DEFAULT ''", 'ALTER');
$result = _dbQuery("ALTER TABLE " . DB_PREPEND . "phpwcms_shop_products ADD INDEX (shopprod_lang)", 'ALTER');
}
}
// do former revision check
// r407 - 413 required no action, so fallback to r406
$r406 = '406';
if (phpwcms_revision_check_temp($r406) !== true) {
$status = phpwcms_revision_check($r406);
}
return $status;
}
示例5: saveFeedback
function saveFeedback()
{
$feedback = array('name' => '', 'email' => '', 'subject' => '', 'message' => '', 'userid' => $_SESSION['SESS_USER_ID'], 'blocked' => 'false', 'dtoc' => date('Y-m-d H:i:s'), 'dtoe' => date('Y-m-d H:i:s'));
foreach ($feedback as $k => $v) {
if (isset($_POST[$k])) {
$feedback[$k] = trim($_POST[$k]);
}
}
$sql = _db()->_insertQ1('feedbacks', $feedback);
$res = _dbQuery($sql);
$id = _db()->insert_id();
if ($res) {
_dbFree($res);
//send email to admin
$mailto = "dawkharrupali@gmail.com";
$mailfrom = "admin@openlogiks.com";
$feedback_content = array("name" => $_REQUEST['name'], "email" => $_REQUEST['email'], "subject" => $_REQUEST['subject'], "message" => $_REQUEST['message']);
$template = _template("feedback_admin", $profile);
loadHelpers('email');
sendMail($mailto, " Feedback", $template, $mailfrom);
return "success";
} else {
return "error";
}
}
示例6: phpwcms_revision_r540
function phpwcms_revision_r540()
{
$status = true;
// do former revision check – fallback to r539
if (phpwcms_revision_check_temp('539') !== true) {
$status = phpwcms_revision_check('539');
}
$result = _dbQuery("SHOW COLUMNS FROM `" . DB_PREPEND . "phpwcms_article` WHERE Field='article_canonical'");
if (!isset($result[0])) {
$insert = _dbQuery("ALTER TABLE `" . DB_PREPEND . "phpwcms_article` ADD `article_canonical` VARCHAR(2000) NOT NULL DEFAULT ''", 'ALTER');
if (!$insert) {
$status = false;
}
}
$result = _dbQuery("SHOW COLUMNS FROM `" . DB_PREPEND . "phpwcms_articlecat` WHERE Field='acat_canonical'");
if (!isset($result[0])) {
$insert = _dbQuery("ALTER TABLE `" . DB_PREPEND . "phpwcms_articlecat` ADD `acat_canonical` VARCHAR(2000) NOT NULL DEFAULT ''", 'ALTER');
if (!$insert) {
$status = false;
}
// Reset cache values
_setConfig('structure_array_vmode_all', false, 'frontend_render', 1);
_setConfig('structure_array_vmode_editor', false, 'frontend_render', 1);
_setConfig('structure_array_vmode_admin', false, 'frontend_render', 1);
}
return $status;
}
示例7: feedimport_filestorage_dirlist
function feedimport_filestorage_dirlist($pid = 0, $prefix = '+', $userID = null, $counter = 0)
{
if (!$counter) {
$GLOBALS['filestorage_dirlist'] = array(0 => $GLOBALS['BL']['be_ftptakeover_rootdir']);
}
$pid = intval($pid);
$sql = "SELECT f_id, f_name, f_uid, usr_login FROM " . DB_PREPEND . "phpwcms_file f ";
$sql .= "LEFT JOIN " . DB_PREPEND . "phpwcms_user u ON u.usr_id=f.f_uid ";
$sql .= "WHERE f.f_pid=" . $pid . " AND ";
if (empty($_SESSION["wcs_user_admin"]) && $userID) {
$sql .= "f.f_uid=" . intval($userID) . " AND ";
}
$sql .= "f.f_kid=0 AND f.f_trash=0 ORDER BY f_name";
$result = _dbQuery($sql);
if (isset($result[0])) {
foreach ($result as $row) {
if ($_SESSION["wcs_user_id"] != $row['f_uid']) {
$row["f_name"] .= ' (' . $row["usr_login"] . ')';
}
$GLOBALS['filestorage_dirlist'][(int) $row['f_id']] = str_repeat($prefix, $counter + 1) . ' ' . $row["f_name"];
feedimport_filestorage_dirlist($row['f_id'], $prefix, $userID, $counter + 1);
}
}
if (!$counter) {
$result = $GLOBALS['filestorage_dirlist'];
unset($GLOBALS['filestorage_dirlist']);
return $result;
}
}
示例8: phpwcms_revision_r534
function phpwcms_revision_r534()
{
$status = true;
// do former revision check – fallback to r533
if (phpwcms_revision_check_temp('533') !== true) {
$status = phpwcms_revision_check('533');
}
// change type of some content related fields from TEXT to MEDIUMTEXT
// Retrieve Types of article content table
$result = _dbQuery("SHOW COLUMNS FROM `" . DB_PREPEND . "phpwcms_articlecontent` WHERE Field IN ('acontent_text', 'acontent_html', 'acontent_media')");
if (isset($result[0]['Type'])) {
foreach ($result as $column) {
$update = _dbQuery("ALTER TABLE `" . DB_PREPEND . "phpwcms_articlecontent` CHANGE `" . $column['Field'] . '` `' . $column['Field'] . "` MEDIUMTEXT NOT NULL", 'ALTER');
if (!$update) {
$status = false;
}
}
}
// Retrieve Types of article table
$result = _dbQuery("SHOW COLUMNS FROM `" . DB_PREPEND . "phpwcms_article` WHERE Field='article_summary'");
if (isset($result[0]['Type'])) {
$update = _dbQuery("ALTER TABLE `" . DB_PREPEND . "phpwcms_article` CHANGE `article_summary` `article_summary` MEDIUMTEXT NOT NULL", 'ALTER');
if (!$update) {
$status = false;
}
}
return $status;
}
示例9: phpwcms_revision_r541
function phpwcms_revision_r541()
{
$status = true;
// do former revision check – fallback to r540
if (phpwcms_revision_check_temp('540') !== true) {
$status = phpwcms_revision_check('540');
}
$result = _dbQuery("SHOW COLUMNS FROM `" . DB_PREPEND . "phpwcms_articlecat` WHERE Field='acat_breadcrumb'");
if (!isset($result[0])) {
$insert = _dbQuery("ALTER TABLE `" . DB_PREPEND . "phpwcms_articlecat` ADD `acat_breadcrumb` INT(1) NOT NULL DEFAULT '0'", 'ALTER');
if (!$insert) {
$status = false;
}
// Reset cache values
_setConfig('structure_array_vmode_all', false, 'frontend_render', 1);
_setConfig('structure_array_vmode_editor', false, 'frontend_render', 1);
_setConfig('structure_array_vmode_admin', false, 'frontend_render', 1);
}
$result = _dbQuery("SHOW COLUMNS FROM `" . DB_PREPEND . "phpwcms_shop_products` WHERE Field='shopprod_unit'");
if (!isset($result[0])) {
if (!($insert = _dbQuery("ALTER TABLE `" . DB_PREPEND . "phpwcms_shop_products` ADD `shopprod_unit` VARCHAR(100) NOT NULL DEFAULT ''", 'ALTER'))) {
$status = false;
}
}
return $status;
}
示例10: phpwcms_revision_r538
function phpwcms_revision_r538()
{
$status = true;
// do former revision check – fallback to r537
if (phpwcms_revision_check_temp('537') !== true) {
$status = phpwcms_revision_check('537');
}
$result = _dbQuery("SHOW COLUMNS FROM `" . DB_PREPEND . "phpwcms_articlecat` WHERE Field='acat_public'");
if (isset($result[0]['Default']) && $result[0]['Default'] == 0) {
$update = _dbQuery("ALTER TABLE `" . DB_PREPEND . "phpwcms_articlecat` CHANGE `acat_public` `acat_public` INT(1) NOT NULL DEFAULT '1'", 'ALTER');
if (!$update) {
$status = false;
}
}
$result = _dbQuery("SHOW COLUMNS FROM `" . DB_PREPEND . "phpwcms_articlecat` WHERE Field='acat_alias'");
if (isset($result[0]['Type']) && strpos($result[0]['Type'], '255') === false) {
$update = _dbQuery("ALTER TABLE `" . DB_PREPEND . "phpwcms_articlecat` CHANGE `acat_alias` `acat_alias` VARCHAR(255) NOT NULL DEFAULT ''", 'ALTER');
if (!$update) {
$status = false;
}
}
// Reset cache values
_setConfig('structure_array_vmode_all', false, 'frontend_render', 1);
_setConfig('structure_array_vmode_editor', false, 'frontend_render', 1);
_setConfig('structure_array_vmode_admin', false, 'frontend_render', 1);
return $status;
}
示例11: getFolderList
/**
* @param int $pid current folder ID
* @param int $img_list_width
* @param int $img_list_height
* @param int $img_list_sl sharpen level
* @param int[] $folders array with active folders in cp
* @param bool|string $active to pass the status to subfolders
* @return string html for folderlist
*/
public function getFolderList($pid, $img_list_width, $img_list_height, $img_list_sl, $folders, $active = 'true')
{
$pid = intval($pid);
$userID = intval($_SESSION["wcs_user_id"]);
$sql = "SELECT f_id, f_name, f_aktiv, f_public, f_uid FROM " . DB_PREPEND . "phpwcms_file WHERE " . "f_pid=" . intval($pid) . " AND f_kid=0 AND f_trash=0 AND (f_public=1 OR f_uid=" . $userID . ") ORDER BY f_sort, f_name";
$data = _dbQuery($sql);
foreach ($data as $key => $val) {
$dirname = html_specialchars($val["f_name"]);
//check if depending files/dirs exist
$sql2 = "SELECT COUNT(f_id) FROM " . DB_PREPEND . "phpwcms_file WHERE " . "f_pid=" . $val["f_id"] . " AND f_kid=0 AND f_trash=0 AND (f_public=1 OR f_uid=" . $userID . ") LIMIT 1";
$data2 = _dbQuery($sql2, 'COUNT');
$folders_act = "";
//curr ID is in selectedFoldersList
if (in_array($val["f_id"], $folders)) {
$folders_act = 'checked="checked"';
}
//start outputfor the row
$this->_folderlist_html .= '<li class="br_module_jqs_folderlist_li">';
//if folder active and parent not inactive
if ($val["f_aktiv"] == 1 && $active == 'true') {
$this->_folderlist_html .= '<span id="openlink' . $val["f_id"] . '" class="br_module_jqs_folderlist_openlink closed" onclick="PHPWCMS_MODULE.JQS.sendRequest(' . $val["f_id"] . ');"> </span>';
} else {
$this->_folderlist_html .= '<span class="br_module_jqs_folderlist_openlink"> </span>';
}
$this->_folderlist_html .= '<input type="checkbox" name="jqs_folders[]" value="' . $val["f_id"] . '" ' . $folders_act;
//if folder active and parent not inactive
if ($val["f_aktiv"] == 1 && $active == 'true') {
$this->_folderlist_html .= ' />' . $dirname;
$this->_folderlist_html .= '<span id="arr' . $val["f_id"] . '"></span><div id="images' . $val["f_id"] . '" style="display:none;"></div>';
} else {
$this->_folderlist_html .= ' disabled="disabled" />' . $dirname;
$this->_folderlist_html .= ' (';
//if folder itself is inactive then show image
if ($val["f_aktiv"] == 0) {
$this->_folderlist_html .= '<img style="vertical-align: text-bottom;" src="include/inc_module/mod_sliderjs/img/active_11x11a_0.gif" />';
}
$this->_folderlist_html .= ')';
//curr ID is in selectedFoldersList
if (in_array($val["f_id"], $folders)) {
//hidden field to pass the ID just in case it's selcted
$this->_folderlist_html .= '<input type="hidden" name="jqs_folders[]" value="' . $val["f_id"] . '">';
}
}
//deeper if subdir
if ($data2) {
//pass the inactive status to all subfolders
if ($val["f_aktiv"] == 0) {
$active = 'false';
}
$this->_folderlist_html .= "<ul>" . LF;
$this->getFolderList($val["f_id"], $img_list_width, $img_list_height, $img_list_sl, $folders, $active);
$this->_folderlist_html .= "</ul>" . LF;
//reset the status for following folders (of same level)
$active = 'true';
}
$this->_folderlist_html .= '</li>' . LF;
}
return $this->_folderlist_html;
}
示例12: phpwcms_revision_r401
function phpwcms_revision_r401()
{
// check if article description field exists
$result = _dbQuery("SHOW COLUMNS FROM " . DB_PREPEND . "phpwcms_article LIKE 'article_description'", 'COUNT_SHOW');
if (empty($result)) {
return _dbQuery("ALTER TABLE " . DB_PREPEND . "phpwcms_article ADD article_description VARCHAR(255) NOT NULL DEFAULT ''", 'ALTER');
}
return true;
}
示例13: registerSettings
function registerSettings($name, $value = "", $scope = "default")
{
$data = array("userid" => $_SESSION['SESS_USER_ID'], "site" => SITENAME, "scope" => $scope, "name" => $name, "settings" => $value);
$q = _db(true)->_insertQ1(_dbtable("settings", true), $data);
$res = _dbQuery($q, true);
if ($res) {
return true;
} else {
return false;
}
}
示例14: phpwcms_revision_r438
function phpwcms_revision_r438()
{
$status = true;
// do former revision check – fallback to r427
if (phpwcms_revision_check_temp('427') !== true) {
$status = phpwcms_revision_check('427');
}
// Fix possible problem
_dbQuery('UPDATE ' . DB_PREPEND . "phpwcms_article SET article_subtitle = '' WHERE article_subtitle = '0'", 'UPDATE');
_dbQuery('UPDATE ' . DB_PREPEND . "phpwcms_article SET article_menutitle = '' WHERE article_menutitle = '0'", 'UPDATE');
_dbQuery('UPDATE ' . DB_PREPEND . "phpwcms_article SET article_description = '' WHERE article_description = '0'", 'UPDATE');
return $status;
}
示例15: phpwcms_revision_r427
function phpwcms_revision_r427()
{
$status = true;
// do former revision check – fallback to r427
$r421 = '421';
if (phpwcms_revision_check_temp($r421) !== true) {
$status = phpwcms_revision_check($r421);
}
// Change some missing default values for older releases
$result = _dbQuery("ALTER TABLE " . DB_PREPEND . "phpwcms_article CHANGE article_menutitle article_menutitle VARCHAR(255) NOT NULL DEFAULT ''", 'ALTER');
$result = _dbQuery("ALTER TABLE " . DB_PREPEND . "phpwcms_article CHANGE article_description article_description VARCHAR(255) NOT NULL DEFAULT ''", 'ALTER');
return $status;
}