• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP loader_import函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中loader_import函数的典型用法代码示例。如果您正苦于以下问题:PHP loader_import函数的具体用法?PHP loader_import怎么用?PHP loader_import使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了loader_import函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: getQueue

 function getQueue($type = false)
 {
     if (!$type) {
         $type = $this->name;
     }
     loader_import('cms.Workspace.Notice.' . $this->types[$type]);
     $res = db_fetch('select * from sitellite_msg_queue where type = ?', $type);
     if (!$res) {
         $this->error = db_error();
         return false;
     } elseif (is_object($res)) {
         $res = array($res);
     }
     foreach ($res as $k => $v) {
         $qid = $res[$k]->id;
         $struct = $res[$k]->struct;
         $res[$k] = unserialize($struct);
         if (!$res[$k]) {
             $this->error = 'unserialize() failed: ' . $struct;
             return false;
         }
         $res[$k]->qid = $qid;
     }
     return $res;
 }
开发者ID:vojtajina,项目名称:sitellite,代码行数:25,代码来源:Notice.php


示例2: onSubmit

 function onSubmit($vals)
 {
     // 1. prepare vals for insertion
     if ($vals['contact_url'] == 'http://') {
         $vals['contact_url'] = '';
     }
     if ($vals['loc_map'] == 'http://') {
         $vals['loc_map'] = '';
     }
     $vals['details'] = nl2br(wordwrap(htmlentities_compat($vals['details']), 70, "\n", true));
     if (!$vals['public'] || empty($vals['public'])) {
         $vals['public'] = 'no';
     }
     if (!$vals['media'] || empty($vals['media'])) {
         $vals['media'] = 'no';
     }
     if (!empty($vals['loc_addr2'])) {
         $vals['loc_address'] .= "\n" . $vals['loc_addr2'];
     }
     $data = array('title' => $vals['title'], 'date' => $vals['date'], 'until_date' => $vals['end_date'], 'time' => $vals['time'], 'until_time' => $vals['end_time'], 'category' => $vals['category'], 'audience' => $vals['audience'], 'details' => $vals['details'], 'contact' => $vals['contact'], 'contact_email' => $vals['contact_email'], 'contact_phone' => $vals['contact_phone'], 'contact_url' => $vals['contact_url'], 'loc_name' => $vals['loc_name'], 'loc_address' => $vals['loc_address'], 'loc_city' => $vals['loc_city'], 'loc_province' => $vals['loc_province'], 'loc_country' => $vals['loc_country'], 'sponsor' => $vals['sponsor'], 'rsvp' => $vals['rsvp'], 'public' => $vals['public'], 'media' => $vals['media'], 'sitellite_status' => 'draft', 'sitellite_access' => 'public');
     if (session_valid()) {
         $data['sitellite_owner'] = session_username();
         $data['sitellite_team'] = session_team();
     }
     // 2. submit event as 'draft'
     loader_import('cms.Versioning.Rex');
     $rex = new Rex('siteevent_event');
     $res = $rex->create($data, 'Event submission.');
     $vals['id'] = $res;
     // 3. email notification
     @mail(appconf('submissions'), 'Event Submission Notice', template_simple('submission_email.spt', $vals));
     // 4. thank you screen
     page_title(intl_get('Thank You!'));
     echo template_simple('submissions.spt');
 }
开发者ID:vojtajina,项目名称:sitellite,代码行数:35,代码来源:index.php


示例3: onSubmit

 function onSubmit($vals)
 {
     unset($vals['submit_button']);
     loader_import('saf.File');
     file_overwrite('inc/app/sitewiki/conf/settings.php', ini_write($vals));
     echo '<p>Settings saved.  <a href="' . site_prefix() . '/index/sitewiki-app">Continue</a></p>';
 }
开发者ID:vojtajina,项目名称:sitellite,代码行数:7,代码来源:index.php


示例4: getThemes

 function getThemes($path = false)
 {
     if (!$path) {
         $path = site_docroot() . '/inc/app/sitepresenter/themes';
     }
     $themes = array();
     //'' => 'Default');
     loader_import('saf.File.Directory');
     $dir = new Dir();
     if (!$dir->open($path)) {
         return $themes;
     }
     foreach ($dir->read_all() as $file) {
         if (strpos($file, '.') === 0 || !@is_dir($path . '/' . $file)) {
             continue;
         }
         //if (preg_match ('/^html.([^\.]+)\.tpl$/', $file, $regs)) {
         //if ($regs[1] == 'default') {
         //	continue;
         //}
         $themes[$file] = ucfirst($file);
         //}
     }
     return $themes;
 }
开发者ID:vojtajina,项目名称:sitellite,代码行数:25,代码来源:Theme.php


示例5: getTemplates

 function getTemplates($path = false)
 {
     if (!$path) {
         $path = 'inc/html/' . conf('Server', 'default_template_set');
     }
     $templates = array('' => 'Inherit', 'default' => 'Default');
     loader_import('saf.File.Directory');
     $dir = new Dir();
     if (!$dir->open($path)) {
         return $templates;
     }
     foreach ($dir->read_all() as $file) {
         if (strpos($file, '.') === 0 || @is_dir($path . '/' . $file)) {
             continue;
         }
         if (preg_match('/^html.([^\\.]+)\\.tpl$/', $file, $regs)) {
             if ($regs[1] == 'default') {
                 continue;
             }
             $templates[$regs[1]] = ucfirst($regs[1]);
         }
     }
     asort($templates);
     return $templates;
 }
开发者ID:vojtajina,项目名称:sitellite,代码行数:25,代码来源:Templates.php


示例6: onSubmit

 function onSubmit($vals)
 {
     loader_import('saf.File');
     if (!preg_match('/\\.html$/', $vals['filename'])) {
         $vals['filename'] .= '.html';
     }
     if (!preg_match('/\\.html$/', $vals['helpfile'])) {
         $vals['helpfile'] .= '.html';
     }
     $vals['body'] = '<h1>' . $vals['title'] . '</h1>' . NEWLINEx2 . $vals['body'];
     if (!file_overwrite(site_docroot() . '/inc/app/' . $vals['appname'] . '/docs/' . $vals['lang'] . '/' . $vals['filename'], $vals['body'])) {
         echo '<p>Error: Unable to write to the file.  Please verify your file and folder permissions.</p>';
         return;
     }
     if ($vals['helpfile'] != $vals['filename']) {
         // erase old file, this is a rename
         $res = @unlink(site_docroot() . '/inc/app/' . $vals['appname'] . '/docs/' . $vals['lang'] . '/' . $vals['helpfile']);
         if (!$res) {
             echo '<p>Error: Unable to remove the old file.  Please verify your file and folder permissions.</p>';
             return;
         }
     }
     header('Location: ' . site_prefix() . '/index/appdoc-helpdoc-action?appname=' . $vals['appname'] . '&lang=' . $vals['lang']);
     exit;
 }
开发者ID:vojtajina,项目名称:sitellite,代码行数:25,代码来源:index.php


示例7: the_cleaners

function the_cleaners($data, $wrap = true, $safe = true)
{
    global $TIDY_PATH;
    if ($TIDY_PATH) {
        ob_start();
        passthru($TIDY_PATH . " -asxhtml -icq -f /dev/null 2>&1 <<END-XED-INPUT\n" . $data . "\nEND-XED-INPUT");
        $data = ob_get_contents();
        ob_end_clean();
        if ($wrap) {
            $data = the_cleaners_strip_tidy_output($data);
        }
        return $data;
    } else {
        if ($wrap) {
            $data = the_cleaners_wrapper($data);
        }
        loader_import('saf.HTML.Messy');
        $messy = new Messy();
        $messy->safe = $safe;
        $data = $messy->clean($data);
        if ($wrap) {
            $data = the_cleaners_remove_wrapper($data);
        }
        return $data;
    }
}
开发者ID:vojtajina,项目名称:sitellite,代码行数:26,代码来源:Cleaners.php


示例8: onSubmit

 function onSubmit($vals)
 {
     loader_import('saf.File');
     loader_import('saf.File.Directory');
     loader_import('saf.Misc.Ini');
     $info = help_get_langs($vals['appname']);
     $info[$vals['lang_code']] = $vals['lang_name'];
     if (!@mkdir(site_docroot() . '/inc/app/' . $vals['appname'] . '/docs/' . $vals['lang_code'], 0777)) {
         echo '<p>Error: Unable to create language folder.  Please verify your folder permissions.</p>';
         return;
     }
     if (!file_overwrite(site_docroot() . '/inc/app/' . $vals['appname'] . '/docs/languages.php', ini_write($info))) {
         echo '<p>Error: Unable to write to the file.  Please verify your folder permissions.</p>';
         return;
     }
     if (!empty($vals['copy_from'])) {
         // copy help files from specified lang to new dir
         $pages = help_get_pages($vals['appname'], $vals['lang']);
         foreach ($pages as $page) {
             $id = help_get_id($page);
             $res = copy(site_docroot() . '/inc/app/' . $vals['appname'] . '/docs/' . $vals['lang'] . '/' . $id . '.html', site_docroot() . '/inc/app/' . $vals['appname'] . '/docs/' . $vals['lang_code'] . '/' . $id . '.html');
             if (!$res) {
                 echo '<p>Error: Unable to duplicate help files.  Please verify your folder permissions.</p>';
                 return;
             }
         }
     }
     // go to new language
     header('Location: ' . site_prefix() . '/index/appdoc-helpdoc-action?appname=' . $vals['appname'] . '&lang=' . $vals['lang_code']);
     exit;
 }
开发者ID:vojtajina,项目名称:sitellite,代码行数:31,代码来源:index.php


示例9: onSubmit

 function onSubmit($vals)
 {
     global $cgi;
     if ($vals['submit_buttons'] == 'Cancel') {
         header('Location: ' . $vals['refer']);
         exit;
     }
     loader_import('cms.Versioning.Rex');
     $rex = new Rex('siteblog_post');
     $id = $cgi->_key;
     $subject = $vals['subject'];
     $author = $vals['author'];
     $status = $vals['status'] == 1 ? 'not visible' : 'visible';
     if (empty($vals['category'])) {
         $vals['category'] = $vals['oldcat'];
     }
     $category = $vals['category'];
     $body = $vals['body'];
     $data = array('subject' => $subject, 'author' => $author, 'status' => $status, 'category' => $category, 'body' => $body);
     if (!empty($id)) {
         $method = $rex->determineAction($id);
         $rex->{$method}($id, $data);
     } else {
         $data['created'] = date('Y-m-d H:i:s');
         $id = $rex->create($data);
     }
     //view post
     header('Location: ' . site_prefix() . '/index/siteblog-view-action?id=' . $id);
     exit;
 }
开发者ID:vojtajina,项目名称:sitellite,代码行数:30,代码来源:index.old.php


示例10: onSubmit

 function onSubmit($vals)
 {
     global $cgi;
     if ($vals['submit_buttons'] == 'Cancel') {
         header('Location: ' . $vals['refer']);
         exit;
     }
     loader_import('cms.Versioning.Rex');
     $rex = new Rex('siteblog_post');
     $id = $cgi->_key;
     $subject = $vals['subject'];
     $author = $vals['author'];
     $status = $vals['status'];
     $category = $vals['category'];
     $created = $vals['created'];
     $body = $vals['body'];
     $data = array('subject' => $subject, 'author' => $author, 'status' => $status, 'category' => $category, 'created' => $created, 'body' => $body);
     if (!empty($id)) {
         if (!$data['created']) {
             unset($data['created']);
         }
         $method = $rex->determineAction($id);
         $rex->{$method}($id, $data);
     } else {
         if (!$data['created']) {
             $data['created'] = date('Y-m-d H:i:s');
         }
         $id = $rex->create($data);
     }
     session_set('sitellite_alert', intl_get('Your item has been saved.'));
     // view post
     if (!empty($vals['_return'])) {
         header('Location: ' . $vals['_return']);
     } else {
         header('Location: ' . site_prefix() . '/index/siteblog-post-action/id.' . $id . '/title.' . siteblog_filter_link_title($subject));
     }
     // ping blog directories via pingomatic.com
     $host = 'rpc.pingomatic.com';
     $path = '';
     $out = template_simple('ping.spt', $obj);
     $len = strlen($out);
     $req = 'POST /' . $path . " HTTP/1.0\r\n";
     $req .= 'User-Agent: Sitellite ' . SITELLITE_VERSION . "/SiteBlog\r\n";
     $req .= 'Host: ' . $host . "\r\n";
     $req .= "Content-Type: text/xml\r\n";
     $req .= 'Content-Length: ' . $len . "\r\n\r\n";
     $req .= $out . "\r\n";
     if ($ph = @fsockopen($host, 80)) {
         @fputs($ph, $req);
         //echo '<pre>';
         //echo htmlentities ($req);
         while (!@feof($ph)) {
             $res = @fgets($ph, 128);
             //echo htmlentities ($res);
         }
         @fclose($ph);
     }
     exit;
 }
开发者ID:vojtajina,项目名称:sitellite,代码行数:59,代码来源:index.php


示例11: onSubmit

 function onSubmit($vals)
 {
     loader_import('cms.Workspace.Message');
     $msg = new WorkspaceMessage();
     $msg->renameCategory($vals['name'], $vals['category']);
     header('Location: ' . site_prefix() . '/index/cms-messages-action');
     exit;
 }
开发者ID:vojtajina,项目名称:sitellite,代码行数:8,代码来源:index.php


示例12: onSubmit

 function onSubmit($vals)
 {
     loader_import('siteforum.Topic');
     $t = new SiteForum_Topic();
     $t->add(array('name' => $vals['name'], 'description' => $vals['description'], 'sitellite_access' => $vals['sitellite_access'], 'sitellite_status' => $vals['sitellite_status']));
     header('Location: ' . site_prefix() . '/index/siteforum-app');
     exit;
 }
开发者ID:vojtajina,项目名称:sitellite,代码行数:8,代码来源:index.php


示例13: loader_import

function &siteevent_translate(&$obj)
{
    loader_import('saf.Database.Generic');
    $g = new Generic('siteevent_event', 'id');
    $g->multilingual = true;
    $res =& $g->translate($obj);
    return $res;
}
开发者ID:vojtajina,项目名称:sitellite,代码行数:8,代码来源:Filters.php


示例14: siteforum_filter_shortdate

function siteforum_filter_shortdate($date)
{
    if (!$date) {
        return '';
    }
    loader_import('saf.Date');
    return Date::timestamp($date, 'M j - g:i A');
}
开发者ID:vojtajina,项目名称:sitellite,代码行数:8,代码来源:Filters.php


示例15: onSubmit

 function onSubmit($vals)
 {
     loader_import('news.Comment');
     $c = new NewsComment();
     $vals['ts'] = date('Y-m-d H:i:s');
     unset($vals['submit_button']);
     $c->modify($vals['id'], $vals);
     page_title(intl_get('Comment Updated'));
     echo template_simple('comment_updated.spt', $vals);
 }
开发者ID:vojtajina,项目名称:sitellite,代码行数:10,代码来源:index.php


示例16: json

function json($data)
{
    if (function_exists('json_encode')) {
        $out = json_encode($data);
    } else {
        loader_import('pear.Services.JSON');
        $json = new Services_JSON();
        $out = $json->encode($data);
    }
    return str_replace('\\/', '/', $out);
}
开发者ID:vojtajina,项目名称:sitellite,代码行数:11,代码来源:index.php


示例17: getWeek

 function getWeek($date, $cat, $aud, $user, $fields = '*')
 {
     loader_import('saf.Date');
     $cur = date('w', strtotime($date));
     if ($cur > 0) {
         $week_of = Date::subtract($date, $cur . ' day');
     } else {
         $week_of = $date;
     }
     $until = Date::add($week_of, '6 day');
     return $this->_eventsInRange($week_of, $until, $cat, $aud, $user, $fields);
 }
开发者ID:vojtajina,项目名称:sitellite,代码行数:12,代码来源:Event.php


示例18: onSubmit

 function onSubmit($vals)
 {
     loader_import('cms.Versioning.Rev');
     $rev = new Rev();
     // default: database, database
     unset($vals['submit_button']);
     $res = $rev->modify('sitellite_page', 'id', $vals['id'], $vals);
     if (!$res) {
         die($rev->error);
     } else {
         header('Location: ' . site_prefix() . '/index/' . $vals['id']);
         exit;
     }
 }
开发者ID:vojtajina,项目名称:sitellite,代码行数:14,代码来源:index.php


示例19: filter_cms_messages_date

/**
 * @package CMS
 */
function filter_cms_messages_date($date)
{
    global $simple_template_register;
    $obj =& $simple_template_register['parent'];
    if ($obj->status == 'unread') {
        $start = '<strong>';
        $end = '</strong>';
    } else {
        $start = '';
        $end = '';
    }
    loader_import('saf.Date');
    return $start . Date::timestamp($date, array('today' => '\\T\\o\\d\\a\\y - g:i A', 'yesterday' => '\\Y\\e\\s\\t\\e\\r\\d\\a\\y - g:i A', 'tomorrow' => '\\T\\o\\m\\o\\r\\r\\o\\w - g:i A', 'this week' => 'l, F j, Y - g:i A', 'other' => 'F j, Y - g:i A')) . $end;
}
开发者ID:vojtajina,项目名称:sitellite,代码行数:17,代码来源:Filters.php


示例20: sitegallery_first_image

function sitegallery_first_image($path)
{
    loader_import('saf.File.Directory');
    $valid = appconf('valid');
    $files = Dir::fetch($path, true);
    foreach ($files as $file) {
        $info = pathinfo($file);
        if (in_array($info['extension'], $valid)) {
            $path = preg_replace('|^pix/|', '', $path);
            return $path . '/' . $file;
        }
    }
    return false;
}
开发者ID:vojtajina,项目名称:sitellite,代码行数:14,代码来源:index.php



注:本文中的loader_import函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP loadforum函数代码示例发布时间:2022-05-15
下一篇:
PHP loader_image_s函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap