本文整理汇总了PHP中xoops_result函数的典型用法代码示例。如果您正苦于以下问题:PHP xoops_result函数的具体用法?PHP xoops_result怎么用?PHP xoops_result使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了xoops_result函数的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: CriteriaCompo
if (!function_exists($comment_config['callback']['update'])) {
$skip = true;
}
} else {
$skip = true;
}
}
if (!$skip) {
$criteria = new CriteriaCompo(new Criteria('com_modid', $com_modid));
$criteria->add(new Criteria('com_itemid', $com_itemid));
$criteria->add(new Criteria('com_status', XOOPS_COMMENT_ACTIVE));
$comment_count = $comment_handler->getCount($criteria);
$comment_config['callback']['update']($com_itemid, $comment_count);
}
}
include XOOPS_ROOT_PATH . '/header.php';
xoops_result($msgs);
echo '<br /><a href="' . $redirect_page . '=' . $com_itemid . '&com_order=' . $com_order . '&com_mode=' . $com_mode . '">' . _BACK . '</a>';
include XOOPS_ROOT_PATH . '/footer.php';
break;
case 'delete':
default:
include XOOPS_ROOT_PATH . '/header.php';
$comment_confirm = array('com_id' => $com_id, 'com_mode' => $com_mode, 'com_order' => $com_order, 'op' => array(_CM_DELETEONE => 'delete_one', _CM_DELETEALL => 'delete_all'));
if (!empty($comment_confirm_extra) && is_array($comment_confirm_extra)) {
$comment_confirm = $comment_confirm + $comment_confirm_extra;
}
xoops_confirm($comment_confirm, 'comment_delete.php', _CM_DELETESELECT);
include XOOPS_ROOT_PATH . '/footer.php';
break;
}
示例2: art_DB_prefix
<?php
/**
* Article management
*
* Import data from smartsection
*
* @copyright The XOOPS project http://www.xoops.org/
* @license http://www.fsf.org/copyleft/gpl.html GNU public license
* @author Taiwen Jiang (phppp or D.J.) <php_pp@hotmail.com>
* @since 1.00
* @version $Id$
* @package module::article
*/
$sql = "\tINSERT INTO " . $GLOBALS['xoopsDB']->prefix("smartsection_categories") . "\t\t(categoryid,\tname,\t\t\tparentid,\tdescription)" . "\tSELECT " . "\t\tcat_id,\t\t\tcat_title,\t\tcat_pid,\tcat_description" . " \tFROM " . art_DB_prefix("category") . "\t\tORDER BY cat_id ASC";
$result = $xoopsDB->queryF($sql);
xoops_result("succeed with building CATEGORY table: " . ($count = $xoopsDB->getAffectedRows()));
$sql = "\tINSERT INTO " . $GLOBALS['xoopsDB']->prefix("smartsection_items") . "\t\t(itemid,\t\ttitle,\t\tcategoryid,\t\tuid,\tmeta_keywords, \tsummary,\t\tdatesub,\t\t\t\tcounter,\t\tcomments,\t\tstatus," . "\t\tbody, \t\t\tdohtml,\t\tdosmiley,\t\tdobr,\tdoimage,\tdoxcode)" . "\tSELECT " . "\t\ta.art_id, \ta.art_title, \ta.cat_id,\t\ta.uid,\ta.art_keywords,\ta.art_summary,\ta.art_time_submit,\t\ta.art_counter,\ta.art_comments,\t2," . "\t\tt.text_body,\tt.dohtml,\tt.dosmiley,\t\tt.dobr,\tt.doimage,\tt.doxcode" . " \tFROM " . art_DB_prefix("article") . " AS a, " . art_DB_prefix("text") . " AS t" . "\tWHERE a.art_id = t.art_id" . "\t\tORDER BY art_id ASC";
$result = $xoopsDB->queryF($sql);
xoops_result("succeed with building ARTICLE table: " . ($count = $xoopsDB->getAffectedRows()));
示例3: sprintf
}
$gperm =& $gperm_handler->create();
$gperm->setVar('gperm_groupid', $group_id);
$gperm->setVar('gperm_name', $perm_name);
$gperm->setVar('gperm_modid', $modid);
$gperm->setVar('gperm_itemid', $item_id);
if (!$gperm_handler->insert($gperm)) {
$msg[] = sprintf(_MD_AM_PERMADDNG, '<b>' . $perm_name . '</b>', '<b>' . $perm_data['itemname'][$item_id] . '</b>', '<b>' . $group_list[$group_id] . '</b>');
} else {
$msg[] = sprintf(_MD_AM_PERMADDOK, '<b>' . $perm_name . '</b>', '<b>' . $perm_data['itemname'][$item_id] . '</b>', '<b>' . $group_list[$group_id] . '</b>');
}
unset($gperm);
}
}
}
} else {
+($msg[] = sprintf(_MD_AM_PERMRESETNG, $module->getVar('name') . '(' . $perm_name . ')'));
}
}
}
$backlink = XOOPS_URL . '/admin.php';
if ($module->getVar('hasadmin')) {
$adminindex = isset($_POST['redirect_url']) ? $_POST['redirect_url'] : $module->getInfo('adminindex');
if ($adminindex) {
$backlink = XOOPS_URL . '/modules/' . $module->getVar('dirname') . '/' . $adminindex;
}
}
$msg[] = '<br /><br /><a href="' . $backlink . '">' . _BACK . '</a>';
xoops_cp_header();
xoops_result($msg);
xoops_cp_footer();
示例4: trim
<div class="clear"></div>
</div>
</div>
</td>
</tr>
<tr>
<td><textarea id="code_mirror" name="templates" rows=24 cols=110>' . $content . '</textarea></td>
</tr>
</table>';
echo '<input type="hidden" name="path_file" value="' . $path_file . '"><input type="hidden" name="file" value="' . trim($_REQUEST['file']) . '"><input type="hidden" name="ext" value="' . $ext . '"></form>';
break;
// Restore backup file
// Restore backup file
case 'tpls_restore':
$extensions = array('.html', '.htm', '.css');
//check if the file is inside themes directory
$valid_dir = stristr(realpath($_REQUEST['path_file']), realpath(XOOPS_ROOT_PATH . '/themes'));
$old_file = $_REQUEST['path_file'] . '.back';
$new_file = $_REQUEST['path_file'];
$extension_verif = strrchr($new_file, '.');
if ($valid_dir && in_array($extension_verif, $extensions) && file_exists($old_file) && file_exists($new_file)) {
if (unlink($new_file)) {
if (rename($old_file, $new_file)) {
xoops_result(_AM_SYSTEM_TEMPLATES_RESTORE_OK);
exit;
}
}
}
xoops_error(_AM_SYSTEM_TEMPLATES_RESTORE_NOTOK);
break;
}
示例5: SystemCheckPlus
function SystemCheckPlus()
{
$root =& XCube_Root::getSingleton();
////////////////////////////////////////////////
if (XC_ADMINSYSTEMCHECK_WELCOME) {
//ex)
//direct output(0), output with legacy_dummy.html(1), output with legacy_admin_welcome.html(2)
$type = 2;
//Umm...Just example!!
//please customize it to design/decorate your html/admin.php
if ($type == 0) {
$welcome = '<b>Welcome to XOOPS Cube Legacy!!</b><br />Have a nice time!!';
echo $welcome;
} elseif ($type == 1) {
$welcome = '<b>Welcome to XOOPS Cube Legacy!!</b><br />Have a nice and happy time!!';
$attributes = array();
$attributes['dummy_content'] = $welcome;
$template = XOOPS_LEGACY_PATH . "/templates/legacy_dummy.html";
Legacy_AdminSystemCheckPlusPreload::display_message($attributes, $template, $return = false);
} elseif ($type == 2) {
//you must prepare your own legacy_admin_welcome.html
if (file_exists(XOOPS_LEGACY_PATH . "/admin/templates/legacy_admin_welcome.html")) {
//it's just a example! please customize it!
$welcome_title = 'Welcome Message!';
$welcome_msg = array();
$welcome_msg[] = 'Welcome to XOOPS Cube Legacy!!';
$welcome_msg[] = 'Have a nice and happy time!!';
$attributes = array();
$attributes['title'] = $welcome_title;
$attributes['messages'] = $welcome_msg;
$template = XOOPS_LEGACY_PATH . "/admin/templates/legacy_admin_welcome.html";
Legacy_AdminSystemCheckPlusPreload::display_message($attributes, $template, $return = false);
}
//file_exists if
}
//type2 if
}
////////////////////////////////////////////////
if (XC_ADMINSYSTEMCHECK_SYSTEMINFO) {
$systeminfo_message = array();
$systeminfo_message[] = _AD_LEGACY_XCLEGACYVERSION . " : " . XOOPS_VERSION;
$systeminfo_message[] = _MD_AM_DTHEME . " : " . $root->mContext->mXoopsConfig['theme_set'];
$systeminfo_message[] = _MD_AM_DTPLSET . " : " . $root->mContext->mXoopsConfig['template_set'];
$systeminfo_message[] = _MD_AM_LANGUAGE . " : " . $root->mContext->mXoopsConfig['language'];
$debugmode = intval($root->mContext->mXoopsConfig['debug_mode']);
if ($debugmode == 0) {
$systeminfo_message[] = _MD_AM_DEBUGMODE . " : " . _MD_AM_DEBUGMODE0;
} elseif ($debugmode == 1) {
$systeminfo_message[] = _MD_AM_DEBUGMODE . " : " . _MD_AM_DEBUGMODE1;
} elseif ($debugmode == 2) {
$systeminfo_message[] = _MD_AM_DEBUGMODE . " : " . _MD_AM_DEBUGMODE2;
} elseif ($debugmode == 3) {
$systeminfo_message[] = _MD_AM_DEBUGMODE . " : " . _MD_AM_DEBUGMODE3;
}
$systemconfig = array();
$systemconfig['phpversion'] = phpversion();
$db =& $root->mController->getDB();
$result = $db->query("SELECT VERSION()");
list($mysqlversion) = $db->fetchRow($result);
$systemconfig['mysqlversion'] = $mysqlversion;
$systemconfig['os'] = substr(php_uname(), 0, 7);
$systemconfig['server'] = xoops_getenv('SERVER_SOFTWARE');
$systemconfig['useragent'] = xoops_getenv('HTTP_USER_AGENT');
$systeminfo_message[] = _AD_LEGACY_OS . " : " . $systemconfig['os'];
$systeminfo_message[] = _AD_LEGACY_SERVER . " : " . $systemconfig['server'];
$systeminfo_message[] = _AD_LEGACY_USERAGENT . " : " . $systemconfig['useragent'];
$systeminfo_message[] = _AD_LEGACY_PHPVERSION . " : " . $systemconfig['phpversion'];
$systeminfo_message[] = _AD_LEGACY_MYSQLVERSION . " : " . $systemconfig['mysqlversion'];
xoops_result($systeminfo_message, _AD_LEGACY_SYSTEMINFO, 'tips');
}
//systeminfo if
/////////////////////////////////////////
if (XC_ADMINSYSTEMCHECK_PHPSETTING) {
$phpsetting_message = array();
$phpsetting_message[] = _AD_LEGACY_PHPSETTING_SM . " : " . (ini_get('safe_mode') ? "<span style=color:red>" . _AD_LEGACY_PHPSETTING_ON . "</span>" : "<span style=color:green>" . _AD_LEGACY_PHPSETTING_OFF . "</span>");
$phpsetting_message[] = _AD_LEGACY_PHPSETTING_MET . " : " . (ini_get('max_execution_time') ? ini_get('max_execution_time') . " sec." : _AD_LEGACY_PHPSETTING_OFF);
$phpsetting_message[] = _AD_LEGACY_PHPSETTING_ML . " : " . (ini_get('memory_limit') ? ini_get('memory_limit') . "b" : _AD_LEGACY_PHPSETTING_OFF);
$phpsetting_message[] = _AD_LEGACY_PHPSETTING_DE . " : " . (ini_get('display_errors') ? "<span style=color:green>" . _AD_LEGACY_PHPSETTING_ON . "</span>" : "<span style=color:red>" . _AD_LEGACY_PHPSETTING_OFF . "</span>");
$phpsetting_message[] = _AD_LEGACY_PHPSETTING_SOT . " : " . (ini_get('short_open_tag') ? "<span style=color:green>" . _AD_LEGACY_PHPSETTING_ON . "</span>" : "<span style=color:red>" . _AD_LEGACY_PHPSETTING_OFF . "</span>");
$phpsetting_message[] = _AD_LEGACY_PHPSETTING_FU . " : " . (ini_get('file_uploads') ? _AD_LEGACY_PHPSETTING_ON . " ( " . _AD_LEGACY_PHPSETTING_FU_UMAX . ini_get('upload_max_filesize') . ", " . _AD_LEGACY_PHPSETTING_FU_PMAX . ini_get('post_max_size') . " )" : _AD_LEGACY_PHPSETTING_OFF);
$phpsetting_message[] = _AD_LEGACY_PHPSETTING_MQ . " : " . (ini_get('magic_quotes_gpc') ? "<span style=color:green>" . _AD_LEGACY_PHPSETTING_ON . "</span>" : "<span style=color:red>" . _AD_LEGACY_PHPSETTING_OFF . "</span>");
$phpsetting_message[] = _AD_LEGACY_PHPSETTING_RG . " : " . (ini_get('register_globals') ? "<span style=color:red>" . _AD_LEGACY_PHPSETTING_ON . " (recommended OFF)</span>" : "<span style=color:green>" . _AD_LEGACY_PHPSETTING_OFF . "</span>");
$phpsetting_message[] = _AD_LEGACY_PHPSETTING_OB . " : " . (ini_get('output_buffering') ? "<span style=color:red>" . _AD_LEGACY_PHPSETTING_ON . "</span>" : "<span style=color:green>" . _AD_LEGACY_PHPSETTING_OFF . "</span>");
$phpsetting_message[] = _AD_LEGACY_PHPSETTING_OBD . " : " . (ini_get('open_basedir') ? "<span style=color:green>" . _AD_LEGACY_PHPSETTING_ON . "</span>" : "<span style=color:red>" . _AD_LEGACY_PHPSETTING_OFF . "</span>");
$phpsetting_message[] = _AD_LEGACY_PHPSETTING_UFO . " : " . (ini_get('allow_url_fopen') ? "<span style=color:red>" . _AD_LEGACY_PHPSETTING_ON . " (recommended OFF)</span>" : "<span style=color:green>" . _AD_LEGACY_PHPSETTING_OFF . "</span>");
$phpsetting_message[] = _AD_LEGACY_PHPSETTING_DOM . " : " . (extension_loaded('dom') ? "<span style=color:green>" . _YES . "</span>" : "<span style=color:red>" . _NO . " (required by recent modules)</span>");
$phpsetting_message[] = _AD_LEGACY_PHPSETTING_EXIF . " : " . (extension_loaded('exif') ? "<span style=color:green>" . _YES . "</span>" : "<span style=color:red>" . _NO . " (required by recent modules)</span>");
$phpsetting_message[] = _AD_LEGACY_PHPSETTING_GTXT . " : " . (extension_loaded('gettext') ? "<span style=color:green>" . _YES . "</span>" : "<span style=color:red>" . _NO . " (required by recent modules)</span>");
$phpsetting_message[] = _AD_LEGACY_PHPSETTING_JSON . " : " . (extension_loaded('json') ? "<span style=color:green>" . _YES . "</span>" : "<span style=color:red>" . _NO . " (required by recent modules)</span>");
$phpsetting_message[] = _AD_LEGACY_PHPSETTING_XML . " : " . (extension_loaded('xml') ? "<span style=color:green>" . _YES . "</span>" : "<span style=color:red>" . _NO . " (required by recent modules)</span>");
$phpsetting_message[] = _AD_LEGACY_PHPSETTING_CRL . " : " . (extension_loaded('curl') ? "<span style=color:green>" . _YES . "</span>" : "<span style=color:red>" . _NO . " (required by recent modules)</span>");
$phpsetting_message[] = _AD_LEGACY_PHPSETTING_ZLIB . " : " . (extension_loaded('zlib') ? "<span style=color:green>" . _YES . "</span>" : "<span style=color:red>" . _NO . " (required by recent modules)</span>");
$phpsetting_message[] = _AD_LEGACY_PHPSETTING_SOAP . " : " . (extension_loaded('soap') ? "<span style=color:green>" . _YES . "</span>" : "<span style=color:red>" . _NO . " (required by recent modules)</span>");
$phpsetting_message[] = _AD_LEGACY_PHPSETTING_MB . " : " . (extension_loaded('mbstring') ? "<span style=color:green>" . _YES . "</span>" : "<span style=color:red>" . _NO . " (required by recent modules)</span>");
$phpsetting_message[] = _AD_LEGACY_PHPSETTING_ICONV . " : " . (function_exists('iconv') ? "<span style=color:green>" . _YES . "</span>" : "<span style=color:red>" . _NO . " (required by recent modules)</span>");
$phpsetting_message[] = _AD_LEGACY_PHPSETTING_GD . " : " . (function_exists('gd_info') ? "<span style=color:green>" . _YES . "</span>" : "<span style=color:red>" . _NO . " (required by recent modules)</span>");
if (function_exists('gd_info')) {
$gd_info = gd_info();
$phpsetting_message[] = "GD Version: {$gd_info['GD Version']}";
}
//.........这里部分代码省略.........
示例6: xoops_result
/**
* xoops_result
*
* @param mixed $msg
* @param string $title
* @return
*/
function xoops_result($msg, $title = '')
{
echo '<div class="resultMsg">';
if ($title != '') {
echo '<strong>' . $title . '</strong><br /><br />';
}
if (is_object($msg)) {
$msg = (array) $msg;
}
if (is_array($msg)) {
foreach ($msg as $key => $value) {
if (is_numeric($key)) {
$key = '';
}
xoops_result($value, $key);
}
} else {
echo "<div>{$msg}</div>";
}
echo '</div>';
}
示例7: xoops_result
}
$form .= "</select>";
$form .= " <input type='submit' name='submit' value='" . _SUBMIT . "' />";
$form .= "</form></p>";
echo $form;
} else {
include XOOPS_ROOT_PATH . "/modules/" . $xoopsModule->getVar("dirname") . "/include/vars.php";
xoops_result("<h2>Data Export To " . $_GET["module"] . "</h2>");
ob_start();
include XOOPS_ROOT_PATH . "/modules/" . $_GET["module"] . "/xoops_version.php";
ob_end_clean();
foreach ($modversion['tables'] as $table) {
$sql = "TRUNCATE TABLE " . $GLOBALS["xoopsDB"]->prefix($table);
$GLOBALS["xoopsDB"]->queryF($sql);
$sql_reset = "ALTER TABLE " . $xoopsDB->prefix($table) . " AUTO_INCREMENT = 1;";
$xoopsDB->queryF($sql_reset);
xoops_result("succeed with emptying TABLE {$table}");
}
include $mods[$_GET["module"]];
$sql = "\tSELECT mid" . " \tFROM " . $GLOBALS['xoopsDB']->prefix("modules") . "\tWHERE dirname = '" . $_GET["module"] . "'";
$result = $xoopsDB->query($sql);
list($mid) = $xoopsDB->fetchRow($result);
if ($mid) {
$modid = $xoopsModule->getVar("mid");
$sql = "\tINSERT INTO " . $GLOBALS['xoopsDB']->prefix("xoopscomments") . "\t\t(`com_pid`, `com_rootid`, `com_modid`, `com_itemid`, `com_icon`, `com_created`,\r\n\t\t\t\t\t\t\t`com_modified`, `com_uid`, `com_ip`, `com_title`, `com_text`, `com_sig`, `com_status`,\r\n\t\t\t\t\t\t\t`com_exparams`, `dohtml`, `dosmiley`, `doxcode`, `doimage`, `dobr`)" . "\tSELECT " . "\t\t`com_pid`, `com_rootid`, {$mid}, `com_itemid`, `com_icon`, `com_created`,\r\n\t\t\t\t\t\t\t`com_modified`, `com_uid`, `com_ip`, `com_title`, `com_text`, `com_sig`, `com_status`,\r\n\t\t\t\t\t\t\t`com_exparams`, `dohtml`, `dosmiley`, `doxcode`, `doimage`, `dobr`" . " \tFROM " . $GLOBALS['xoopsDB']->prefix("xoopscomments") . " \tWHERE com_modid = {$modid} " . "\t\tORDER BY `com_id` ASC";
$result = $xoopsDB->queryF($sql);
xoops_result("succeed with building comment table: " . ($count = $xoopsDB->getAffectedRows()));
}
xoops_result("<h2>The data export is executed successfully</h2>");
}
xoops_cp_footer();
示例8: portfolio_block_case_show
function portfolio_block_case_show($options)
{
global $xoopsDB;
$service_handler = xoops_getmodulehandler('service', 'portfolio');
$case_handler = xoops_getmodulehandler('case', 'portfolio');
$cs_handler = xoops_getmodulehandler('cs', 'portfolio');
$images_handler = xoops_getmodulehandler('images', 'portfolio');
$cases = '';
$case_ids = '';
//weight
if ($options[1] == "case_weight") {
$weight = "ASC";
} elseif ($options[1] == "case_datetime") {
$weight = "DESC";
} else {
$weight = "ASC";
}
if (!empty($options[0])) {
$cs = $cs_handler->getCaseIds(array($options[0]));
if (!empty($cs)) {
foreach ($cs as $k => $v) {
$case_ids[] = $v['case_id'];
}
}
}
$criteria = new CriteriaCompo();
if (!empty($case_ids)) {
if (!is_array($case_ids)) {
$case_ids = array($case_ids);
}
$criteria->add(new Criteria("case_id", "(" . implode(", ", $case_ids) . ")", "in"), 'AND');
unset($case_ids);
}
if ($options[12] == 0) {
$criteria->add(new Criteria('case_status', 1));
$criteria->setSort($options[1]);
$criteria->setOrder($weight);
$criteria->setLimit($options[2]);
$criteria->setStart(0);
$cases = $case_handler->getAll($criteria, null, false);
} else {
$query = "SELECT * FROM " . $xoopsDB->prefix("portfolio_case");
$query .= " WHERE case_image != '' ";
$query .= " AND case_status = '1' ";
if (!empty($case_ids)) {
$case_ids = implode(", ", $case_ids);
$query .= " AND case_id in ({$case_ids}) ";
}
$query .= " ORDER BY {$options[1]} {$weight} LIMIT 0 , {$options[2]}";
$result = $xoopsDB->query($query);
$rows = array();
while ($row = $xoopsDB->fetchArray($result)) {
$rows[] = $row;
}
xoops_result($rows);
if (count($rows) > 0) {
foreach ($rows as $row) {
$res =& $case_handler->create(false);
$res->assignVars($row);
$_res = array();
foreach ($row as $tag => $val) {
$_res[$tag] = @$res->getVar($tag);
}
$cases[] = $_res;
unset($res, $_res);
}
}
}
if (!empty($cases)) {
$myts = MyTextSanitizer::getInstance();
// Case service
$services = $service_handler->getList();
foreach ($cases as $k => $v) {
$case_ids[] = $k;
$cases[$k]['case_pushtime'] = formatTimestamp($v['case_pushtime'], 'Y-m-d');
$cases[$k]['case_datetime'] = formatTimestamp($v['case_datetime'], 'Y-m-d');
$case_summary = strip_tags($myts->undoHtmlSpecialChars(strip_tags($v['case_summary'])));
$case_description = strip_tags($myts->undoHtmlSpecialChars(strip_tags($v['case_description'])));
if (!empty($options[7])) {
$cases[$k]['case_title'] = xoops_substr($v['case_title'], '', $options[7]);
$cases[$k]['case_menu_title'] = xoops_substr($v['case_menu_title'], '', $options[7]);
}
if (!empty($options[8])) {
$cases[$k]['case_summary'] = xoops_substr($case_summary, '', $options[8]);
} else {
$cases[$k]['case_summary'] = $case_summary;
}
if ($options[9]) {
$cases[$k]['case_description'] = xoops_substr($case_description, '', $options[9]);
} else {
$cases[$k]['case_description'] = $case_description;
}
}
$cs_services = $cs_handler->getServerIds($case_ids);
foreach ($cs_services as $k => $v) {
$cs_services[$k]['service'] = $services[$v['service_id']];
}
foreach ($cases as $k => $v) {
$cases[$k]['service'] = '';
foreach ($cs_services as $key => $val) {
//.........这里部分代码省略.........
示例9: foreach
foreach ($mods as $mod => $file) {
$form .= "<option value='{$mod}'>{$mod}</option>";
}
$form .= "</select>";
$form .= " <input type='submit' name='submit' value='" . _SUBMIT . "' />";
$form .= "</form></p>";
echo $form;
} else {
include XOOPS_ROOT_PATH . "/modules/" . $xoopsModule->getVar("dirname") . "/include/vars.php";
xoops_result("<h2>Data Import From " . $_GET["module"] . "</h2>");
foreach ($xoopsModule->getInfo("tables") as $table) {
$sql = "TRUNCATE TABLE " . $GLOBALS["xoopsDB"]->prefix($table);
$GLOBALS["xoopsDB"]->queryF($sql);
$sql_reset = "ALTER TABLE " . $xoopsDB->prefix($table) . " AUTO_INCREMENT = 1;";
$xoopsDB->queryF($sql_reset);
xoops_result("succeed with emptying TABLE {$table}");
}
include $mods[$_GET["module"]];
$sql = "\tSELECT mid" . " \tFROM " . $GLOBALS['xoopsDB']->prefix("modules") . "\tWHERE dirname = '" . $_GET["module"] . "'";
$result = $xoopsDB->query($sql);
list($mid) = $xoopsDB->fetchRow($result);
if ($mid) {
$modid = $xoopsModule->getVar("mid");
$sql = "\tINSERT INTO " . $GLOBALS['xoopsDB']->prefix("xoopscomments") . "\t\t(`com_pid`, `com_rootid`, `com_modid`, `com_itemid`, `com_icon`, `com_created`,\r\n\t\t\t\t\t\t\t`com_modified`, `com_uid`, `com_ip`, `com_title`, `com_text`, `com_sig`, `com_status`,\r\n\t\t\t\t\t\t\t`com_exparams`, `dohtml`, `dosmiley`, `doxcode`, `doimage`, `dobr`)" . "\tSELECT " . "\t\t`com_pid`, `com_rootid`, {$modid}, `com_itemid`, `com_icon`, `com_created`,\r\n\t\t\t\t\t\t\t`com_modified`, `com_uid`, `com_ip`, `com_title`, `com_text`, `com_sig`, `com_status`,\r\n\t\t\t\t\t\t\t`com_exparams`, `dohtml`, `dosmiley`, `doxcode`, `doimage`, `dobr`" . " \tFROM " . $GLOBALS['xoopsDB']->prefix("xoopscomments") . " \tWHERE com_modid = {$mid} " . "\t\tORDER BY `com_id` ASC";
$result = $xoopsDB->queryF($sql);
xoops_result("succeed with building comment table: " . ($count = $xoopsDB->getAffectedRows()));
}
xoops_result("<h2>The data import is executed successfully</h2>");
xoops_result("<p>Please run\r\n\t\t<ol>\r\n\t\t<li><a href='../admin/admin.permission.php' target='_blank'>Permission Management</a></li>\r\n\t\t<li><a href='../admin/admin.synchronization.php' target='_blank'>Data Synchronization</a></li>\r\n\t\t</ol>\r\n\t\tfrom admin panel.</p>");
}
xoops_cp_footer();
示例10: deltree
if ($name === '.' || $name === '..') {
continue;
}
$full_name = $dossier . '/' . $name;
if (is_dir($full_name)) {
deltree($full_name);
} else {
unlink($full_name);
}
}
closedir($dir);
@rmdir($dossier);
return true;
}
if (deltree($_REQUEST['path'])) {
xoops_result(_AM_SYSTEM_FILEMANAGER_DELDIR_OK);
} else {
xoops_error(_AM_SYSTEM_FILEMANAGER_DELDIR_NOTOK);
}
break;
case 'filemanager_add_file':
if ($_REQUEST['path'] != '') {
$path = trim($_REQUEST['path']);
} else {
$path = XOOPS_ROOT_PATH . '/';
}
$form = new XoopsThemeForm('', 'newdir_form', 'admin.php?fct=filemanager', 'post', true);
$form->setExtra('enctype="multipart/form-data"');
$form->addElement(new XoopsFormText(_AM_SYSTEM_FILEMANAGER_ADDFILE, 'file_name', 50, 255), true);
$form->addElement(new XoopsFormHidden('op', 'filemanager_add_file_save'));
$form->addElement(new XoopsFormHidden('path', $path));
示例11: xoops_result
echo '$_COOKIE["shoutcookie"] ='.$_COOKIE["shoutcookie"]."<br \>\n";
echo '$online[2] ='.$oneline[2]."<br \>\n";
echo '$time() ='.time()."<br \>\n";
*/
/*
if($xoopsUser && $xoopsUser->uname() == $oneline[0])
{
$lastmine=1;
}elseif(!empty($username) && $username == $oneline[0])
{
$lastmine=1;
}
if(shoutbox_setCookie($oneline[2]) && $lastmine==0)
{
$newmessage = 1;
}
}
*/
$shouts = $shoutbox->getShouts(1, $xoopsModuleConfig['allow_bbcode'], $xoopsModuleConfig['maxshouts_view']);
if (!empty($shouts)) {
$xoopsTpl->assign('shouts', $shouts);
} else {
xoops_result(_MD_SHOUTBOX_POPUP_NOSHOUTS, 0);
}
$xoopsTpl->assign('lang_anonymous', $xoopsConfig['anonymous']);
$xoopsTpl->assign('special_stuff_head', $special_stuff_head);
$xoopsTpl->assign('newmessage', $newmessage);
$xoopsTpl->assign('config', $xoopsModuleConfig);
$xoopsTpl->xoops_setCaching(0);
$xoopsTpl->display('db:shoutbox_popupframe.html');