本文整理匯總了PHP中IPSText::alphanumericalClean方法的典型用法代碼示例。如果您正苦於以下問題:PHP IPSText::alphanumericalClean方法的具體用法?PHP IPSText::alphanumericalClean怎麽用?PHP IPSText::alphanumericalClean使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類IPSText
的用法示例。
在下文中一共展示了IPSText::alphanumericalClean方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: doExecute
/**
* Class entry point
*
* @param object ipsRegistry reference
* @return @e void [Outputs to screen]
*/
public function doExecute(ipsRegistry $registry)
{
/* INIT */
$smilie_id = 0;
$editor_id = IPSText::alphanumericalClean($this->request['editor_id']);
/* Query the emoticons */
$this->DB->build(array('select' => 'typed, image', 'from' => 'emoticons', 'where' => "emo_set='" . $this->registry->output->skin['set_emo_dir'] . "'"));
$this->DB->execute();
/* Loop through and build output array */
$rows = array();
if ($this->DB->getTotalRows()) {
while ($r = $this->DB->fetch()) {
$smilie_id++;
if (strstr($r['typed'], """)) {
$in_delim = "'";
$out_delim = '"';
} else {
$in_delim = '"';
$out_delim = "'";
}
$rows[] = array('code' => stripslashes($r['typed']), 'image' => stripslashes($r['image']), 'in' => $in_delim, 'out' => $out_delim, 'smilie_id' => $smilie_id);
}
}
/* Output */
$this->returnHtml($this->registry->getClass('output')->getTemplate('legends')->emoticonPopUpList($editor_id, $rows));
}
示例2: show
/**
* Show the form
*
* @return @e void [Outputs to screen]
*/
protected function show()
{
//-----------------------------------------
// INIT
//-----------------------------------------
$name = trim(IPSText::alphanumericalClean(ipsRegistry::$request['name']));
$member_id = intval(ipsRegistry::$request['member_id']);
$output = '';
//-----------------------------------------
// Get member data
//-----------------------------------------
$member = IPSMember::load($member_id, 'extendedProfile,customFields');
//-----------------------------------------
// Got a member?
//-----------------------------------------
if (!$member['member_id']) {
$this->returnJsonError($this->lang->words['t_noid']);
}
//-----------------------------------------
// Return the form
//-----------------------------------------
if (method_exists($this->html, $name)) {
$output = $this->html->{$name}($member);
}
//-----------------------------------------
// Print...
//-----------------------------------------
$this->returnHtml($output);
}
示例3: refresh
/**
* Refresh the captcha image
*
* @return @e void [Outputs to screen]
*/
public function refresh()
{
$captcha_unique_id = trim(IPSText::alphanumericalClean(ipsRegistry::$request['captcha_unique_id']));
$template = $this->registry->getClass('class_captcha')->getTemplate($captcha_unique_id);
$newUniqueID = $this->registry->getClass('class_captcha')->captchaKey;
$this->returnString($newUniqueID);
}
示例4: doExecute
/**
* Class entry point
*
* @param object Registry reference
* @return @e void [Outputs to screen]
*/
public function doExecute(ipsRegistry $registry)
{
//-----------------------------------------
// INIT
//-----------------------------------------
$member_id = intval(ipsRegistry::$request['member_id']);
$md5check = IPSText::md5Clean($this->request['md5check']);
$CONFIG = array();
$tab = explode(':', ipsRegistry::$request['tab']);
$app = substr(IPSText::alphanumericalClean(str_replace('..', '', trim($tab[0]))), 0, 20);
$tab = substr(IPSText::alphanumericalClean(str_replace('..', '', trim($tab[1]))), 0, 20);
$this->registry->class_localization->loadLanguageFile(array('public_profile'), 'members');
//-----------------------------------------
// MD5 check
//-----------------------------------------
if ($md5check != $this->member->form_hash) {
$this->returnString('error');
}
//-----------------------------------------
// Load member
//-----------------------------------------
$member = IPSMember::load($member_id);
//-----------------------------------------
// Check
//-----------------------------------------
if (!$member['member_id']) {
$this->returnString('error');
}
//-----------------------------------------
// Load config
//-----------------------------------------
if (!is_file(IPSLib::getAppDir($app) . '/extensions/profileTabs/' . $tab . '.conf.php')) {
$this->returnString('error');
}
require IPSLib::getAppDir($app) . '/extensions/profileTabs/' . $tab . '.conf.php';
/*noLibHook*/
//-----------------------------------------
// Active?
//-----------------------------------------
if (!$CONFIG['plugin_enabled']) {
$this->returnString('error');
}
//-----------------------------------------
// Load main class...
//-----------------------------------------
if (!is_file(IPSLib::getAppDir($app) . '/extensions/profileTabs/' . $tab . '.php')) {
$this->returnString('error');
}
require IPSLib::getAppDir('members') . '/sources/tabs/pluginParentClass.php';
/*noLibHook*/
$classToLoad = IPSLib::loadLibrary(IPSLib::getAppDir($app) . '/extensions/profileTabs/' . $tab . '.php', 'profile_' . $tab, $app);
$plugin = new $classToLoad($this->registry);
$html = $plugin->return_html_block($member);
//-----------------------------------------
// Return it...
//-----------------------------------------
$this->returnHtml($html);
}
示例5: runTask
/**
* Run a task
*
* @access public
* @return void
*/
public function runTask()
{
if (ipsRegistry::$request['ck'] and ipsRegistry::$request['ck']) {
$this->type = 'cron';
$this->cron_key = substr(trim(stripslashes(IPSText::alphanumericalClean(ipsRegistry::$request['ck']))), 0, 32);
}
if ($this->type == 'internal') {
//-----------------------------------------
// Loaded by our image...
// ... get next job
//-----------------------------------------
$this_task = $this->DB->buildAndFetch(array('select' => '*', 'from' => 'task_manager', 'where' => 'task_enabled = 1 AND task_next_run <= ' . $this->time_now, 'order' => 'task_next_run ASC', 'limit' => array(0, 1)));
} else {
//-----------------------------------------
// Cron.. load from cron key
//-----------------------------------------
$this_task = $this->DB->buildAndFetch(array('select' => '*', 'from' => 'task_manager', 'where' => "task_cronkey='" . $this->cron_key . "'"));
}
if ($this_task['task_id']) {
//-----------------------------------------
// Locked?
//-----------------------------------------
if ($this_task['task_locked'] > 0) {
# Yes - now, how long has it been locked for?
# If longer than 30 mins, unlock as something
# has gone wrong.
if ($this_task['task_locked'] < time() - 1800) {
$newdate = $this->generateNextRun($this_task);
$this->DB->update('task_manager', array('task_next_run' => $newdate, 'task_locked' => 0), "task_id=" . $this_task['task_id']);
$this->saveNextRunStamp();
}
# Cancel and return
return;
}
//-----------------------------------------
// Got it, now update row, lock and run..
//-----------------------------------------
$newdate = $this->generateNextRun($this_task);
$this->DB->update('task_manager', array('task_next_run' => $newdate, 'task_locked' => time()), "task_id=" . $this_task['task_id']);
$this->saveNextRunStamp();
if (file_exists(IPSLib::getAppDir($this_task['task_application']) . '/tasks/' . $this_task['task_file'])) {
require_once IPSLib::getAppDir($this_task['task_application']) . '/tasks/' . $this_task['task_file'];
$myobj = new task_item($this->registry, $this, $this_task);
$myobj->runTask();
//-----------------------------------------
// Any shutdown queries
//-----------------------------------------
$this->DB->return_die = 0;
if (count($this->DB->obj['shutdown_queries'])) {
foreach ($this->DB->obj['shutdown_queries'] as $q) {
$this->DB->query($q);
}
}
$this->DB->return_die = 1;
$this->DB->obj['shutdown_queries'] = array();
}
}
}
示例6: doExecute
/**
* Class entry point
*
* @access public
* @param object Registry reference
* @return void [Outputs to screen/redirects]
*/
public function doExecute(ipsRegistry $registry)
{
//-----------------------------------------
// INIT
//-----------------------------------------
if ($this->request['j_do']) {
$this->request['do'] = $this->request['j_do'];
}
//-----------------------------------------
// We offline?
//-----------------------------------------
if ($this->settings['board_offline']) {
header("HTTP/1.1 503 Service Temporarily Unavailable");
print $this->lang->words['rss_board_offline'];
exit;
}
//-----------------------------------------
// Grab the plugin
//-----------------------------------------
$type = 'forums';
if ($this->request['type']) {
if (file_exists(IPSLib::getAppDir(IPSText::alphanumericalClean($this->request['type'])) . '/extensions/rssOutput.php')) {
$type = IPSText::alphanumericalClean($this->request['type']);
}
}
//-----------------------------------------
// And grab the content
//-----------------------------------------
require_once IPSLib::getAppDir($type) . '/extensions/rssOutput.php';
$classname = "rss_output_" . $type;
$rss_library = new $classname($this->registry);
$this->to_print = $rss_library->returnRSSDocument();
$expires = $rss_library->grabExpiryDate();
//-----------------------------------------
// Then output
//-----------------------------------------
@header('Content-Type: text/xml; charset=' . IPS_DOC_CHAR_SET);
@header('Expires: ' . gmstrftime('%c', $expires) . ' GMT');
@header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
@header('Pragma: public');
print $this->to_print;
exit;
}
示例7: __construct
/**
* Constructor
*
* @access public
* @param object ipsRegistry reference
* @return void
*/
public function __construct($registry)
{
/* Make object */
$this->registry = ipsRegistry::instance();
$this->DB = $this->registry->DB();
$this->settings =& $this->registry->fetchSettings();
$this->request =& $this->registry->fetchRequest();
$this->cache = $this->registry->cache();
$this->caches =& $this->registry->cache()->fetchCaches();
$this->_member = self::instance();
$this->_memberData =& self::instance()->fetchMemberData();
$this->_userAgent = substr($this->_member->user_agent, 0, 200);
//-----------------------------------------
// Fix up app / section / module
//-----------------------------------------
$this->current_appcomponent = IPS_APP_COMPONENT;
$this->current_module = IPSText::alphanumericalClean($this->request['module']);
$this->current_section = IPSText::alphanumericalClean($this->request['section']);
$this->settings['session_expiration'] = $this->settings['session_expiration'] ? $this->settings['session_expiration'] : 60;
}
示例8: getName
public function getName()
{
return $this->_skinSet['set_id'] . '__' . IPSText::alphanumericalClean($this->_skinSet['set_name']);
}
示例9: parseBbcode
/**
* Loop over the bbcode and make replacements as necessary
*
* @access public
* @param string Current text
* @param string [db|display] Current method to parse
* @param mixed [optional] Only parse the selected code(s)
* @return string Converted text
*/
public function parseBbcode($txt, $cur_method = 'db', $_code = null)
{
//-----------------------------------------
// Pull out the non-replacable codes
//-----------------------------------------
if (!is_string($_code)) {
$txt = $this->_storeNonParsed($txt, $cur_method);
}
//-----------------------------------------
// We want preDbParse method called for shared
// media for permission checking, so force it for now..
//-----------------------------------------
if ($cur_method == 'db') {
$this->_bbcodes[$cur_method]['sharedmedia'] = $this->_bbcodes['display']['sharedmedia'];
$txt = preg_replace_callback('#(\\[code.*\\[/code\\])#is', array($this, '_checkForEmbeddedCode'), $txt);
}
//-----------------------------------------
// Regular replacing
//-----------------------------------------
if (isset($this->_bbcodes[$cur_method]) and is_array($this->_bbcodes[$cur_method]) and count($this->_bbcodes[$cur_method])) {
foreach ($this->_bbcodes[$cur_method] as $_bbcode) {
//-----------------------------------------
// Can this group use this bbcode?
//-----------------------------------------
if ($_bbcode['bbcode_groups'] != 'all' and $this->parsing_mgroup) {
$pass = false;
$groups = array_diff(explode(',', $_bbcode['bbcode_groups']), array(''));
$mygroups = array($this->parsing_mgroup);
if ($this->parsing_mgroup_others) {
$mygroups = array_diff(array_merge($mygroups, explode(',', IPSText::cleanPermString($this->parsing_mgroup_others))), array(''));
}
foreach ($groups as $g_id) {
if (in_array($g_id, $mygroups)) {
$pass = true;
break;
}
}
if (!$pass) {
continue;
}
}
//-----------------------------------------
// Reset our current position
//-----------------------------------------
$this->cur_pos = 0;
//-----------------------------------------
// Store teh tags
//-----------------------------------------
$_tags = array($_bbcode['bbcode_tag']);
//-----------------------------------------
// We'll also need to check for any aliases
//-----------------------------------------
if ($_bbcode['bbcode_aliases']) {
$aliases = explode(',', trim($_bbcode['bbcode_aliases']));
if (is_array($aliases) and count($aliases)) {
foreach ($aliases as $alias) {
$_tags[] = trim($alias);
}
}
}
//-----------------------------------------
// If we have a plugin, just pass off
//-----------------------------------------
if ($_bbcode['bbcode_php_plugin']) {
/* Legacy issues */
if ($_bbcode['bbcode_php_plugin'] == 'defaults.php') {
$file = IPS_ROOT_PATH . 'sources/classes/text/parser/bbcode/' . $_bbcode['bbcode_php_plugin'];
$class = 'bbcode_plugin_' . IPSText::alphanumericalClean($_bbcode['bbcode_tag']);
$method = "run";
} else {
$file = IPS_ROOT_PATH . 'sources/classes/bbcode/custom/' . $_bbcode['bbcode_php_plugin'];
$class = 'bbcode_' . IPSText::alphanumericalClean($_bbcode['bbcode_tag']);
$method = "pre" . ucwords($cur_method) . "Parse";
}
//-----------------------------------------
// Are we only parsing one code?
//-----------------------------------------
if (is_array($_code)) {
$good = false;
foreach ($_tags as $_tag) {
if (in_array($_tag, $_code)) {
$good = true;
break;
// Got one, stop here
}
}
if (!$good) {
continue;
}
} else {
if (is_string($_code)) {
//.........這裏部分代碼省略.........
示例10: getName
public function getName()
{
if (strstr($this->_group, 'skin_')) {
return preg_replace('#^skin_(.*)$#', '\\1', IPSText::alphanumericalClean($this->_group));
} else {
if ($this->_group == 'css') {
return '0.css';
}
}
}
示例11: loadAttachmentPlugin
/**
* Loads child extends class.
*
* @return @e void
*/
public function loadAttachmentPlugin()
{
/* INIT */
$this->type = IPSText::alphanumericalClean($this->type);
/* No plugin yet? Load it! */
if (!is_object($this->plugin) && $this->type) {
/* Load... */
foreach (IPSLIb::getEnabledApplications() as $app) {
if (is_file(IPSLib::getAppDir($app['app_directory']) . '/extensions/attachments/plugin_' . $this->type . '.php')) {
$classToLoad = IPSLib::loadLibrary(IPSLib::getAppDir($app['app_directory']) . '/extensions/attachments/plugin_' . $this->type . '.php', 'plugin_' . $this->type, $app['app_directory']);
$this->plugin = new $classToLoad($this->registry);
$this->plugin->getSettings();
/* Found it, stop */
break;
}
}
/* Still here? Error out then.. */
if (!is_object($this->plugin)) {
print "Could not locate plugin {$this->type}";
exit;
}
}
}
示例12: doExecute
/**
* Class entry point
*
* @param object Registry reference
* @return @e void [Outputs to screen/redirects]
*/
public function doExecute(ipsRegistry $registry)
{
//-----------------------------------------
// INIT
//-----------------------------------------
if ($this->request['j_do']) {
$this->request['do'] = $this->request['j_do'];
}
//-----------------------------------------
// We offline?
//-----------------------------------------
if ($this->settings['board_offline']) {
if (isset($_SERVER['SERVER_PROTOCOL']) and strstr($_SERVER['SERVER_PROTOCOL'], '/1.0')) {
header("HTTP/1.0 503 Service Temporarily Unavailable");
} else {
header("HTTP/1.1 503 Service Temporarily Unavailable");
}
print $this->lang->words['rss_board_offline'];
exit;
}
//-----------------------------------------
// Grab the plugin
//-----------------------------------------
$type = 'forums';
if ($this->request['type']) {
if (IPSLib::appIsInstalled(IPSText::alphanumericalClean($this->request['type']))) {
if (is_file(IPSLib::getAppDir(IPSText::alphanumericalClean($this->request['type'])) . '/extensions/rssOutput.php')) {
$type = IPSText::alphanumericalClean($this->request['type']);
}
}
}
//-----------------------------------------
// And grab the content
//-----------------------------------------
if (IPSLib::appIsInstalled($type)) {
$classToLoad = IPSLib::loadLibrary(IPSLib::getAppDir($type) . '/extensions/rssOutput.php', 'rss_output_' . $type, $type);
$rss_library = new $classToLoad($this->registry);
$this->to_print = $rss_library->returnRSSDocument();
$expires = $rss_library->grabExpiryDate();
}
//-----------------------------------------
// No output?
//-----------------------------------------
if (!$this->to_print) {
if (isset($_SERVER['SERVER_PROTOCOL']) and strstr($_SERVER['SERVER_PROTOCOL'], '/1.0')) {
header("HTTP/1.0 503 Service Temporarily Unavailable");
} else {
header("HTTP/1.1 503 Service Temporarily Unavailable");
}
print $this->lang->words['rssappoffline'];
exit;
}
//-----------------------------------------
// Then output
//-----------------------------------------
@header('Content-Type: text/xml; charset=' . IPS_DOC_CHAR_SET);
@header('Expires: ' . gmstrftime('%c', $expires) . ' GMT');
@header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
@header('Pragma: public');
print $this->to_print;
exit;
}
示例13: creatorImage
/**
* Fetch creator image
*
* @return string (img URL)
*/
public function creatorImage($status)
{
/* Got a creator? */
if (!$status['status_creator']) {
$status['status_creator'] = 'ipb';
}
$creator = IPSText::alphanumericalClean($status['status_creator']);
/* Image exists? */
if (!is_file(IPS_PUBLIC_PATH . 'style_status/' . $creator . '.png')) {
$creator = 'ipb';
}
return $this->settings['public_dir'] . 'style_status/' . $creator . '.png';
}
示例14: _initReportForm
/**
* Main function for making reports and uses the custom plugins
*
* @access private
* @return void
*/
private function _initReportForm()
{
//-----------------------------------------
// Make sure we have an rcom
//-----------------------------------------
$rcom = IPSText::alphanumericalClean($this->request['rcom']);
if (!$rcom) {
$this->registry->output->showError('reports_what_now', 10134);
}
//-----------------------------------------
// Request plugin info from database
//-----------------------------------------
$row = $this->DB->buildAndFetch(array('select' => '*', 'from' => 'rc_classes', 'where' => "my_class='{$rcom}' AND onoff=1"));
if (!$row['com_id']) {
$this->registry->output->showError('reports_what_now', 10135);
} else {
//-----------------------------------------
// Can this group report this type of page?
//-----------------------------------------
if ($row['my_class'] == '' || count(array_diff($this->member_group_ids, explode(',', $row['group_can_report']))) >= count($this->member_group_ids)) {
$this->registry->output->showError('reports_cant_report', 10136);
}
require_once IPSLib::getAppDir('core') . '/sources/classes/reportNotifications.php';
$notify = new reportNotifications($this->registry);
//-----------------------------------------
// Let's get cooking! Load the plugin
//-----------------------------------------
$this->registry->getClass('reportLibrary')->loadPlugin($row['my_class']);
//-----------------------------------------
// Process 'extra data' for the plugin
//-----------------------------------------
if ($row['extra_data'] && $row['extra_data'] != 'N;') {
$this->registry->getClass('reportLibrary')->plugins[$row['my_class']]->_extra = unserialize($row['extra_data']);
} else {
$this->registry->getClass('reportLibrary')->plugins[$row['my_class']]->_extra = array();
}
$send_code = intval($this->request['send']);
if ($send_code == 0) {
//-----------------------------------------
// Request report form from plugin
//-----------------------------------------
$this->output .= $this->registry->getClass('reportLibrary')->plugins[$row['my_class']]->reportForm($row);
} else {
//-----------------------------------------
// Form key not valid
//-----------------------------------------
if ($this->request['k'] != $this->member->form_hash) {
$this->registry->getClass('output')->showError('no_permission', 20114);
}
//-----------------------------------------
// Empty report
//-----------------------------------------
if (!trim(strip_tags($this->request['message']))) {
$this->registry->output->showError('reports_cant_empty', 10181);
}
//-----------------------------------------
// Sending report... do necessary things
//-----------------------------------------
$report_data = $this->registry->getClass('reportLibrary')->plugins[$row['my_class']]->processReport($row);
$this->registry->getClass('reportLibrary')->updateCacheTime();
//-----------------------------------------
// Send out notfications...
//-----------------------------------------
$notify->initNotify($this->registry->getClass('reportLibrary')->plugins[$row['my_class']]->getNotificationList(substr($row['mod_group_perm'], 1, strlen($row['mod_group_perm']) - 2), $report_data), $report_data);
$notify->sendNotifications();
//-----------------------------------------
// Redirect...
//-----------------------------------------
$this->registry->getClass('reportLibrary')->plugins[$row['my_class']]->reportRedirect($report_data);
}
}
}
示例15: exportSkinLang
/**
* Export skin and languages
*
* @return @e void
*/
public function exportSkinLang()
{
/* INIT */
$start = intval($this->request['st']);
$converted = 0;
$options = IPSSetUp::getSavedData('custom_options');
$_doSkin = $options['core'][30001]['exportSkins'];
$_doLang = $options['core'][30001]['exportLangs'];
/* Doing anything? */
if (!$_doSkin and !$_doLang) {
$this->registry->output->addMessage("Нечего экспортировать");
/* Next Page */
$this->request['workact'] = 'pms';
return;
}
/* Ok... */
if (!$start) {
/* Do langs.. */
if ($_doLang) {
if (!is_dir(IPS_CACHE_PATH . 'cache/previousLangFiles')) {
if (@mkdir(IPS_CACHE_PATH . 'cache/previousLangFiles', IPS_FOLDER_PERMISSION)) {
@chmod(IPS_CACHE_PATH . 'cache/previousLangFiles', IPS_FOLDER_PERMISSION);
}
}
try {
foreach (new DirectoryIterator(IPS_CACHE_PATH . 'cache/lang_cache') as $file) {
if (!$file->isDot() and $file->isDir()) {
$name = $file->getFilename();
if (substr($name, 0, 1) != '.') {
$this->registry->output->addMessage("Перенесена директория языка: {$name}");
@rename(IPS_CACHE_PATH . 'cache/lang_cache/' . $name, IPS_CACHE_PATH . 'cache/previousLangFiles/' . $name);
}
}
}
} catch (Exception $e) {
}
}
}
/* Doing skins? */
if ($_doSkin) {
$this->DB->build(array('select' => '*', 'from' => 'skin_sets', 'where' => 'set_skin_set_id > ' . $start, 'limit' => array(0, 1), 'order' => 'set_skin_set_id ASC'));
$this->DB->execute();
$set = $this->DB->fetch();
if (!$set) {
$this->request['st'] = 0;
/* All done.. */
$this->registry->output->addMessage("Все стили обработаны");
/* Next Page */
$this->request['workact'] = 'pms';
return;
} else {
if (!is_dir(IPS_CACHE_PATH . 'cache/previousSkinFiles')) {
if (@mkdir(IPS_CACHE_PATH . 'cache/previousSkinFiles', IPS_FOLDER_PERMISSION)) {
@chmod(IPS_CACHE_PATH . 'cache/previousSkinFiles', IPS_FOLDER_PERMISSION);
}
}
$safeName = IPSText::alphanumericalClean($set['set_name']);
$dirPath = IPS_CACHE_PATH . 'cache/previousSkinFiles/' . $safeName;
if (@mkdir($dirPath, IPS_FOLDER_PERMISSION)) {
@chmod($dirPath, IPS_FOLDER_PERMISSION);
}
if (is_dir($dirPath)) {
/* Export CSS */
if (@mkdir($dirPath . '/css', IPS_FOLDER_PERMISSION)) {
@chmod($dirPath . '/css', IPS_FOLDER_PERMISSION);
}
@file_put_contents($dirPath . '/css/css.css', $set['set_cache_css']);
/* Export Wrapper */
if (@mkdir($dirPath . '/wrapper', IPS_FOLDER_PERMISSION)) {
@chmod($dirPath . '/wrapper', IPS_FOLDER_PERMISSION);
}
@file_put_contents($dirPath . '/wrapper/wrapper.html', $set['set_wrapper']);
/* Export Templates */
if (@mkdir($dirPath . '/templates', IPS_FOLDER_PERMISSION)) {
@chmod($dirPath . '/templates', IPS_FOLDER_PERMISSION);
}
$this->DB->build(array('select' => '*', 'from' => 'skin_templates_old', 'where' => 'set_id=' . $set['set_skin_set_id'], 'order' => 'func_name ASC'));
$this->DB->execute();
while ($row = $this->DB->fetch()) {
$_groupName = IPSText::alphanumericalClean($row['group_name']);
$_bitName = IPSText::alphanumericalClean($row['func_name']);
/* Make section dir */
if (@mkdir($dirPath . '/templates/' . $_groupName, IPS_FOLDER_PERMISSION)) {
@chmod($dirPath . '/templates/' . $_groupName, IPS_FOLDER_PERMISSION);
}
@file_put_contents($dirPath . '/templates/' . $_groupName . '/' . $_bitName . '.html', $row['section_content']);
}
}
/* Set ID */
$this->request['st'] = $set['set_skin_set_id'];
/* We did some, go check again.. */
$this->registry->output->addMessage($set['set_name'] . " Exported");
/* Next Page */
$this->request['workact'] = 'skinlang';
return;
//.........這裏部分代碼省略.........