コード例 #1
0
ファイル: reCaptcha.php プロジェクト: ariep/ZenPhoto20-DEV
 /**
  * generates a simple captcha for comments
  *
  * Thanks to gregb34 who posted the original code
  *
  * Returns the captcha code string and image URL (via the $image parameter).
  *
  * @return string;
  */
 function getCaptcha($prompt = NULL)
 {
     $theme = getOption('reCaptcha_theme');
     $publicKey = getOption('reCaptcha_public_key');
     $lang = strtolower(substr(ZENPHOTO_LOCALE, 0, 2));
     if (!getOption('reCaptcha_public_key')) {
         return array('input' => '', 'html' => '<p class="errorbox">' . gettext('reCAPTCHA is not properly configured.') . '</p>', 'hidden' => '');
     } else {
         $source = getPlugin('reCaptcha/' . $theme . '/reCaptcha.html');
         if ($source) {
             $webpath = dirname(getplugin('reCaptcha/' . $theme . '/reCaptcha.html', false, true));
             $tr = array('__GETHELP__' => gettext("Help"), '__GETIMAGE__' => gettext("Get a visual challenge"), '__GETAUDIO__' => gettext("Get an audio challenge"), '__RELOAD__' => gettext("Get another challenge"), '__WORDS__' => gettext("Type the two words"), '__NUMBERS__' => gettext("Type what you hear"), '__ERROR__' => gettext("Incorrect please try again"), '__SOURCEWEBPATH__' => $webpath);
             $html = strtr(file_get_contents($source), $tr);
             $theme = 'custom';
             //	to tell google to use the above
         } else {
             $html = '';
         }
         $themejs = '<script type="text/javascript">' . "\n" . "  var RecaptchaOptions = {\n";
         if (!in_array($lang, array('de', 'en', 'es', 'fr', 'nl', 'ru', 'pt', 'tr'))) {
             // google's list as of June 2013
             $themejs .= "      custom_translations : {\n" . "               instructions_visual : 'Type the two words',\n" . "               instructions_audio : 'Type what you hear',\n" . "               play_again : 'Play sound again',\n" . "               cant_hear_this : 'Download the sound as MP3',\n" . "               visual_challenge : 'Get a visual challenge',\n" . "               audio_challenge : 'Get an audio challenge',\n" . "               refresh_btn : 'Get another challenge',\n" . "               help_btn : 'Help',\n" . "               incorrect_try_again : 'Incorrect please try again',\n" . "      },\n";
         }
         $themejs .= "       lang : '{$lang}',\n" . "\t\t\t\ttheme : '{$theme}'\n" . "\t\t\t\t};\n" . "</script>\n";
         $html .= recaptcha_get_html($publicKey, NULL, secureServer());
         return array('html' => '<label class="captcha_label">' . $prompt . '</label>', 'input' => $themejs . $html);
     }
 }
コード例 #2
0
ファイル: left.php プロジェクト: dalinhuang/water-svn
<div class="page_b_a">
    <div id="container" style="width:200px">
      <h1 class="type"><a href="javascript:void(0)">常规管理</a></h1>
      <div class="content">
      	<div class="page_b_a_line"></div>
        <ul class="MM">
          <li><a href="?p=sys">基本设置</a></li>
          <li><a href="?p=admin/category_list/1_1_fid=0">栏目管理</a></li>
        </ul>
      </div>
      <h1 class="type"><a href="javascript:void(0)">内容管理</a></h1>
      <div class="content">
      <div class="page_b_a_line"></div>
        <ul class="MM">
        <?php 
foreach (getplugin("category_list", "1_1_isshow=1") as $c) {
    ?>
		  <li><a href="?p=admin/article_list/10_1_fid=<?php 
    print $c['id'];
    ?>
"><?php 
    print $c['title'];
    ?>
</a></li>
        <?php 
}
?>
        </ul>
      </div>
      <h1 class="type"><a href="javascript:void(0)">模块管理</a></h1>
      <div class="content">
コード例 #3
0
ファイル: plugins.php プロジェクト: Sajaki/wowroster_dev
//blocks array from the addon databse table for the order
$blocks = array();
$query = "SELECT * FROM `" . $roster->db->table('blocks', $addon['basename']) . "` ORDER BY `block_location` ASC;";
$result = $roster->db->query($query);
while ($row = $roster->db->fetch($result)) {
    $blocks[$row['block_id']] = $row;
}
$position = 0;
$r = array();
$h = count($blocks);
//echo $h;
if (!empty($plugins)) {
    foreach ($plugins as $plugin_name => $plugin) {
        if ($plugin['parent'] == $addon['basename']) {
            if ($roster->plugin_data[$plugin_name]['active'] == '1') {
                $xplugin = getplugin($plugin_name);
                if (!empty($xplugin['icon'])) {
                    if (strpos($xplugin['icon'], '.') !== false) {
                        $xplugin['icon'] = ROSTER_PATH . 'plugins/' . $xplugin['basename'] . '/images/' . $xplugin['icon'];
                    } else {
                        $xplugin['icon'] = $roster->config['interface_url'] . 'Interface/Icons/' . $xplugin['icon'] . '.' . $roster->config['img_suffix'];
                    }
                } else {
                    $xplugin['icon'] = $roster->config['interface_url'] . 'Interface/Icons/inv_misc_questionmark.' . $roster->config['img_suffix'];
                }
                $r[$xplugin['addon_id']] = array('id' => isset($xplugin['addon_id']) ? $xplugin['addon_id'] : '', 'icon' => $xplugin['icon'], 'fullname' => $xplugin['fullname'], 'location' => $position++, 'basename' => $xplugin['basename'], 'parent' => $xplugin['parent'], 'version' => $xplugin['version'], 'description' => $xplugin['description']);
                if (isset($blocks[$xplugin['addon_id']]) && is_array($blocks[$xplugin['addon_id']])) {
                    $blocks[$xplugin['addon_id']] = array_merge($blocks[$xplugin['addon_id']], $r[$xplugin['addon_id']]);
                } else {
                    $h++;
                    $blocks[$xplugin['addon_id']] = $r[$xplugin['addon_id']];
コード例 #4
0
ファイル: article_add.php プロジェクト: dalinhuang/water-svn
include "top.php";
include "left.php";
?>
<script charset="utf-8" src="module/editor/kindeditor.js"></script>
<script>
        KE.show({
                id : 'content',
        });
</script>
    						<div>
<form action="?p=form/article/add" method="post" class="form">
                                	<fieldset><legend>文章基本信息</legend>
                                        <p class="first">					
                                           <label for="fid">栏目:</label>	
                                           <?php 
$db = getplugin("category_get", " id=" . $par);
?>
			
                                           <input type="hidden" name="fid" size="10"  value="<?php 
print $db['id'];
?>
" readonly="readonly" style="width:auto"/>
                                           <font style="font-weight:bold"> <?php 
print $db['title'];
?>
</font>											
                                        </p>
                                        <p>					
                                            <label for="title">文章标题:</label>				
                                            <input type="text" name="title" style="width:250px"/>	
                                            <font>*</font>				
コード例 #5
0
ファイル: plugin_conf.php プロジェクト: Sajaki/wowroster_dev
 *
 *
 * @copyright  2002-2011 WoWRoster.net
 * @license    http://www.gnu.org/licenses/gpl.html   Licensed under the GNU General Public License v3.
 * @package    WoWRoster
 * @subpackage RosterCP
*/
if (!defined('IN_ROSTER') || !defined('IN_ROSTER_ADMIN')) {
    exit('Detected invalid access to this file!');
}
if (!isset($roster->pages[2])) {
    $roster->set_message($roster->locale->act['specify_addon'], $roster->locale->act['addon_error'], 'error');
    return;
}
// Initialize addon framework for this addon and return the addon's db profile.
$addon = getplugin($roster->pages[2]);
// Check if addon is active
if ($addon['active'] = '1') {
    // Check if this addon is in the process of an upgrade and deny access if it hasn't yet been upgraded
    $installfile = $addon['inc_dir'] . 'install.def.php';
    $install_class = $addon['basename'] . 'Install';
    if (file_exists($installfile)) {
        include_once $installfile;
        if (class_exists($install_class)) {
            $addonstuff = new $install_class();
            // -1 = overwrote newer version
            //  0 = same version
            //  1 = upgrade available
            if (version_compare($addonstuff->version, $addon['version'])) {
                $roster->set_message(sprintf($roster->locale->act['addon_upgrade_notice'], $addon['basename']) . '<br /><a href="' . makelink('rostercp-install') . '">' . sprintf($roster->locale->act['installer_click_upgrade'], $addon['version'], $addonstuff->version) . '</a>', $roster->locale->act['addon_error'], 'error');
                return;
コード例 #6
0
ファイル: roster.php プロジェクト: Sajaki/wowroster
 function get_global_plugins()
 {
     global $global_plugins;
     $global_plugins = array();
     if (!isset($this->plugin_data) || empty($this->plugin_data)) {
         $this->get_plugin_data();
     }
     // Try to load plugins
     if (!empty($this->plugin_data)) {
         foreach ($this->plugin_data as $plugin_name => $plugin) {
             if ($this->plugin_data[$plugin_name]['active'] == '1') {
                 $xplugin = getplugin($plugin_name);
                 foreach ($this->multilanguages as $lang) {
                     $this->locale->add_locale_file($xplugin['locale_dir'] . $lang . '.php', $lang);
                 }
                 if ($plugin['scope'] == 'global') {
                     $classfile = ROSTER_PLUGINS . $plugin_name . DIR_SEP . $plugin_name . '.php';
                     require $classfile;
                     $global_plugins[$plugin_name] = new $plugin_name($xplugin);
                 }
             }
         }
     }
 }
コード例 #7
0
ファイル: category_get.php プロジェクト: dalinhuang/water-svn
                                	<fieldset><legend>栏目基本信息</legend>
                                		<input type="hidden" value="<?php 
print $db['id'];
?>
" name="id"/>
                                        <p class="first">					
                                            <label for="fid">父栏目:</label>				
                                            <input type="hidden" name="fid" size="10"  value="<?php 
print $db['fid'];
?>
" readonly="readonly" style="width:auto"/>
                                            <font style="font-weight:bold"> <?php 
if ($db['fid'] == 0) {
    print "该栏目为顶级栏目";
} else {
    $fcat = getplugin("category_get", " id=" . $db['fid']);
    print $fcat['title'];
}
?>
</font>									
                                        </p>
                                        <p>					
                                            <label for="title">栏目名称:</label>				
                                            <input type="text" name="title" size="30" value="<?php 
print $db['title'];
?>
"/>	
                                            <font>*</font>				
                                        </p>
                                        <p>					
                                            <label for="isshow">显示:</label>				
コード例 #8
0
ファイル: rostercp.php プロジェクト: Sajaki/wowroster_dev
        // Since we add all locales for localization, we save the current locale array
        // This is in case one addon has the same locale strings as another, and keeps them from overwritting one another
        $localetemp = $roster->locale->wordings;
        foreach ($roster->multilanguages as $lang) {
            $roster->locale->add_locale_file(ROSTER_ADDONS . $row['basename'] . DIR_SEP . 'locale' . DIR_SEP . $lang . '.php', $lang);
        }
        $roster->tpl->assign_block_vars('addon_pagebar', array('SELECTED' => isset($roster->pages[2]) && $roster->pages[2] == $row['basename'] ? true : false, 'LINK' => makelink('rostercp-addon-' . $row['basename']), 'NAME' => isset($roster->locale->act[$row['fullname']]) ? $roster->locale->act[$row['fullname']] : $row['fullname']));
        // Restore our locale array
        $roster->locale->wordings = $localetemp;
        unset($localetemp);
    }
}
$roster->get_plugin_data();
$roster->tpl->assign_var('PLUGIN_PAGEBAR', (bool) count($roster->plugin_data));
foreach ($roster->plugin_data as $row) {
    $plugin = getplugin($row['basename']);
    updateCheck($plugin);
    if (file_exists($plugin['admin_dir'] . 'index.php') || $plugin['config'] != '') {
        // Save current locale array
        // Since we add all locales for localization, we save the current locale array
        // This is in case one plugin has the same locale strings as another, and keeps them from overwritting one another
        if (!empty($plugin['config'])) {
            $localetemp = $roster->locale->wordings;
            foreach ($roster->multilanguages as $lang) {
                $roster->locale->add_locale_file(ROSTER_PLUGINS . $row['basename'] . DIR_SEP . 'locale' . DIR_SEP . $lang . '.php', $lang);
            }
            $roster->tpl->assign_block_vars('plugin_pagebar', array('SELECTED' => isset($roster->pages[2]) && $roster->pages[2] == $row['basename'] ? true : false, 'LINK' => makelink('rostercp-plugin-' . $row['basename']), 'NAME' => isset($roster->locale->act[$row['fullname']]) ? $roster->locale->act[$row['fullname']] : $row['fullname']));
            // Restore our locale array
            $roster->locale->wordings = $localetemp;
            unset($localetemp);
        }
コード例 #9
0
ファイル: article_list.php プロジェクト: dalinhuang/water-svn
<?php

include "top.php";
include "left.php";
$db = getplugin("article_list", $par);
?>
          
<div>
	<div class="nowtable">
		<span style="float:left">内容列表</span>
		<span style="float:right; margin-right:5px"><a href="?p=admin/article_add/<?php 
print $par;
?>
">添加内容</a></span>
	</div>             
	<ul class="listul">
	<?php 
foreach ($db['query'] as $c) {
    ?>
		<li>
			<div class="left"><a href="?p=category/get/<?php 
    print $c['id'];
    ?>
"> <?php 
    print $c['title'];
    ?>
</a></div>
			<div class="right"><a href="?p=admin/article_get/<?php 
    print $c['id'];
    ?>
">修改</a>  |  <a href="#" onClick="del(<?php 
コード例 #10
0
ファイル: umemberslist.php プロジェクト: Sajaki/wowroster
 /**
  * Build the list of plugins to include based on roster scope and if plugins have plugins
  *
  *
  */
 function _initPlugins()
 {
     global $roster, $addon;
     $plugins = $roster->plugin_data;
     if (!empty($plugins)) {
         foreach ($plugins as $plugin_name => $plugin) {
             //$dirx = ROSTER_ADDONS . $plugin['basename'] . DIR_SEP . 'inc' . DIR_SEP . 'plugins' . DIR_SEP;
             if ($plugin['parent'] == $addon['basename']) {
                 if ($roster->plugin_data[$plugin_name]['active'] == '1') {
                     $xplugin = getplugin($plugin_name);
                     foreach ($roster->multilanguages as $lang) {
                         $roster->locale->add_locale_file($xplugin['locale_dir'] . $lang . '.php', $lang);
                     }
                     $plugin['scope'] = explode('|', $plugin['scope']);
                     //if ($plugin['scope'] == $roster->scope)
                     if (in_array($roster->scope, $plugin['scope'])) {
                         $classfile = ROSTER_PLUGINS . $plugin_name . DIR_SEP . $plugin_name . '.php';
                         require $classfile;
                         $pluginstuff = new $plugin_name();
                         $this->members_list_select .= $pluginstuff->members_list_select;
                         $this->members_list_table .= $pluginstuff->members_list_table;
                         if (isset($pluginstuff->members_list_where)) {
                             $this->members_list_where[] = $pluginstuff->members_list_where;
                         }
                         $this->members_list_fields[] = $pluginstuff->members_list_fields;
                         unset($pluginstuff);
                     }
                 }
             }
         }
     }
     return true;
 }
コード例 #11
0
ファイル: functions.lib.php プロジェクト: Sajaki/wowroster
 /**
  * Build the list of plugins to include based on roster scope and if plugins have plugins
  *
  *
  */
 function _initPlugins()
 {
     global $roster, $addon;
     $plugins = $roster->plugin_data;
     if (!empty($plugins)) {
         foreach ($plugins as $plugin_name => $plugin) {
             //$dirx = ROSTER_ADDONS . $plugin['basename'] . DIR_SEP . 'inc' . DIR_SEP . 'plugins' . DIR_SEP;
             if ($plugin['parent'] == $addon['basename']) {
                 if ($roster->plugin_data[$plugin_name]['active'] == '1') {
                     $xplugin = getplugin($plugin_name);
                     foreach ($roster->multilanguages as $lang) {
                         $roster->locale->add_locale_file($xplugin['locale_dir'] . $lang . '.php', $lang);
                     }
                     $plugin['scope'] = explode('|', $plugin['scope']);
                     //if ($plugin['scope'] == $roster->scope)
                     if (in_array($roster->scope, $plugin['scope'])) {
                         $classfile = ROSTER_PLUGINS . $plugin_name . DIR_SEP . $plugin_name . '.php';
                         require $classfile;
                         $pluginstuff = new $plugin_name($xplugin);
                         $this->block[] = array('name' => $roster->locale->act[$plugin_name]['title'], 'output' => $pluginstuff->output, 'icon' => $pluginstuff->icon);
                         unset($pluginstuff);
                     }
                 }
             }
         }
     }
     return true;
 }
コード例 #12
0
<?php

include "top.php";
include "left.php";
?>
   
<div>
	<div class="nowtable">
    <span style="float:left">
    <a href="?p=admin/category_add/0">添加顶级栏目</a>
	</span>
	<span style="float:right; margin-right:5px; font-size:12px"></span>
	</div>
	<ul class="listul">
		<?php 
foreach (getplugin("category_list", $par) as $c) {
    ?>
		<li>
			<div class="left"><a href="?p=admin/category_list/1_1_fid=<?php 
    print $c['id'];
    ?>
"><?php 
    print $c['title'];
    ?>
</a></div>
			<div class="right"><a href="?p=admin/article_add/<?php 
    print $c['id'];
    ?>
">添加文章</a> | <a href="?p=admin/category_add/<?php 
    print $c['id'];
    ?>
コード例 #13
0
ファイル: index.php プロジェクト: dalinhuang/water-svn
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>前台页面</title>
</head>
<link href="<?php 
print WATERS_Front;
?>
/css.css" type="text/css" rel="stylesheet"/>

<body>
<?php 
include "top.htm";
$db = getplugin("article_list", "3_1_fid=1");
foreach ($db['query'] as $c) {
    print $c['title'];
}
?>
</body>
</html>
コード例 #14
0
ファイル: index.php プロジェクト: Grades/Grades---Alpha
<?php

//echo "<b>index.php</b> erfolgreich geladen.<br>";
//Seitentitel, falls kein Inhalt
$site_title = "ohne Titel";
require_once "config.php";
require_once "plugins/plugins.php";
getplugin(sql);
require_once "sites/sites.php";
// Oberfläche laden
//require_once ("skin/skin.php");
?>
<title><?php 
echo site_title_suffix . "{$site_title}";
?>
</title>
コード例 #15
0
ファイル: article_get.php プロジェクト: dalinhuang/water-svn
<?php

include "top.php";
include "left.php";
?>
<script charset="utf-8" src="module/editor/kindeditor.js"></script>
<script>
        KE.show({
                id : 'content',
        });
</script>
<?php 
$db = getplugin("article_get", " id=" . $par);
?>
<div>
<form action="?p=form/article/upt" method="post" class="form">
                                	<fieldset><legend>文章基本信息</legend>
                                    <input type="hidden" name="id" value="<?php 
print $db['id'];
?>
">
                                        <p class="first">					
                                            <label for="fid">栏目ID:</label>				
                                            <input type="text" name="fid" size="10"  value="<?php 
print $db['fid'];
?>
" readonly="readonly" style="width:40px"/>
                                            <font>* 只读属性</font>					
                                        </p>
                                        <p>					
                                            <label for="title">文章标题:</label>				
コード例 #16
0
 /**
  * Build the list of plugins to include based on roster scope and if plugins have plugins
  *
  *
  */
 function _initPlugins()
 {
     global $roster, $addon;
     $plugins = $roster->plugin_data;
     $blocks = array();
     $query = "SELECT * FROM `" . $roster->db->table('blocks', $addon['basename']) . "` ORDER BY `block_location` ASC;";
     $result = $roster->db->query($query);
     while ($row = $roster->db->fetch($result)) {
         $blocks[$row['block_name']] = $row;
     }
     foreach ($blocks as $name => $data) {
         if (isset($plugins[$name]['active']) && $data['block_name'] == $plugins[$name]['basename']) {
             $xplugin = getplugin($name);
             foreach ($roster->multilanguages as $lang) {
                 $roster->locale->add_locale_file($xplugin['locale_dir'] . $lang . '.php', $lang);
             }
             $plugin['scope'] = explode('|', $plugins[$name]['scope']);
             if (in_array($roster->scope, $plugin['scope'])) {
                 $classfile = ROSTER_PLUGINS . $name . DIR_SEP . $name . '.php';
                 require $classfile;
                 $pluginstuff = new $name($xplugin);
                 $blocks[$name] = array('name' => $roster->locale->act[$name]['title'], 'output' => $pluginstuff->output, 'icon' => $pluginstuff->icon);
                 unset($pluginstuff);
             }
         } else {
             $query = "DELETE FROM `" . $roster->db->table('blocks', $addon['basename']) . "` WHERE `block_name` = '" . $name . "';";
             $result = $roster->db->query($query);
             unset($blocks[$name]);
         }
     }
     $this->block = $blocks;
     return true;
 }