Example #1
0
function messaging($subject, $content)
{
    global $lang, $mysql;
    LoadPluginLang('messaging', 'messaging', '', 'mes');
    if (!$subject || trim($subject) == "") {
        msg(array("type" => "error", "text" => $lang['mes_msge_subject']));
    } elseif (!$content || trim($content) == "") {
        msg(array("type" => "error", "text" => $lang['mes_msge_content']));
    } else {
        $mailBody = nl2br($content);
        $mailSubject = $subject;
        foreach ($mysql->select("SELECT mail FROM `" . uprefix . "_users`") as $row) {
            $mailTo = $row['mail'];
            sendEmailMessage($mailTo, $mailSubject, $mailBody, $filename = false, $mail_from = false, $ctype = 'text/html');
        }
        msg(array("text" => $lang['mes_msgo_sent']));
    }
}
Example #2
0
<?php

if (!defined('NGCMS')) {
    exit('HAL');
}
LoadPluginLang('eshop', 'main', '', '', '#');
add_act('index', 'eshop_header_show');
register_plugin_page('eshop', '', 'eshop');
register_plugin_page('eshop', 'show', 'show_eshop');
register_plugin_page('eshop', 'search', 'search_eshop');
register_plugin_page('eshop', 'stocks', 'stocks_eshop');
register_plugin_page('eshop', 'compare', 'compare_eshop');
register_plugin_page('eshop', 'currency', 'currency_eshop');
register_plugin_page('eshop', 'yml_export', 'yml_export_eshop');
register_plugin_page('eshop', 'ebasket_list', 'plugin_ebasket_list');
register_plugin_page('eshop', 'ebasket_update', 'plugin_ebasket_update');
register_plugin_page('eshop', 'order', 'order_eshop');
register_plugin_page('eshop', 'payment', 'payment_eshop');
include_once dirname(__FILE__) . '/cache.php';
function eshop_header_show()
{
    global $CurrentHandler, $SYSTEM_FLAGS, $template, $lang;
    /* print '<pre>';
       print_r ($CurrentHandler);
       print '</pre>'; */
    /* print '<pre>';
       print_r ($SYSTEM_FLAGS);
       print '</pre>';  */
    if (empty($_REQUEST['page'])) {
        $page = $CurrentHandler['params']['page'];
    } else {
Example #3
0
<?php

if (!defined('NGCMS')) {
    exit('HAL');
}
plugins_load_config();
LoadPluginLang('eshop', 'config', '', '', '#');
include_once dirname(__FILE__) . '/cache.php';
include_once dirname(__FILE__) . '/functions.php';
switch ($_REQUEST['action']) {
    case 'list_product':
        list_product();
        break;
    case 'add_product':
        add_product();
        break;
    case 'edit_product':
        edit_product();
        break;
    case 'modify_product':
        modify_product();
        list_product();
        break;
    case 'list_feature':
        list_feature();
        break;
    case 'add_feature':
        add_feature();
        break;
    case 'edit_feature':
        edit_feature();
Example #4
0
<?php

/*
 * Configuration file for plugin "Breadcrumbs" for Next Generation CMS 0.9.3
 * Copyright (C) 2010-2011 Alexey N. Zhukov (http://digitalplace.ru)
 * web:    http://digitalplace.ru
 * e-mail: zhukov.alexei@gmail.com
 */
pluginsLoadConfig();
LoadPluginLang('breadcrumbs', 'config', '', 'bc', ':');
$cfg = array();
array_push($cfg, array('descr' => $lang['bc:description']));
array_push($cfg, array('name' => 'block_full_path', 'title' => $lang['bc:block_full_path'], 'type' => 'select', 'values' => array(1 => $lang['yesa'], 0 => $lang['noa']), 'value' => pluginGetVariable($plugin, 'block_full_path')));
$cfgX = array();
array_push($cfgX, array('name' => 'template_source', 'title' => $lang['bc:template_source_title'], 'type' => 'select', 'values' => array('0' => $lang['bc:template_source_site'], '1' => $lang['bc:template_source_plugin']), 'value' => intval(pluginGetVariable($plugin, 'template_source'))));
array_push($cfg, array('mode' => 'group', 'title' => $lang['bc:template_source'], 'entries' => $cfgX));
if ($_REQUEST['action'] == 'commit') {
    commit_plugin_config_changes($plugin, $cfg);
    print_commit_complete($plugin);
} else {
    generate_config_page($plugin, $cfg);
}
Example #5
0
 * 
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 *
 */
if (!defined('NGCMS')) {
    die('Galaxy in danger');
}
add_act('index', 'breadcrumbs');
LoadPluginLang('breadcrumbs', 'main', '', 'bc', ':');
function breadcrumbs()
{
    global $lang, $catz, $catmap, $template, $CurrentHandler, $config, $SYSTEM_FLAGS, $tpl, $systemAccessURL, $twig;
    $tpath = locatePluginTemplates(array('breadcrumbs'), 'breadcrumbs', pluginGetVariable('breadcrumbs', 'template_source'));
    $location = array();
    $location_last = '';
    # processing 404 page
    if ($SYSTEM_FLAGS['info']['title']['group'] == $lang['404.title']) {
        $link = str_replace(array('{home_url}', '{home_title}'), array($config['home_url'], $lang['bc:mainpage']), $lang['bc:page_404']);
        $location[] = array('url' => $config['home_url'], 'title' => $lang['bc:mainpage'], 'link' => $link);
        $location_last = $lang['404.title'];
    } else {
        if ($CurrentHandler) {
            $params = $CurrentHandler['params'];
            $pluginName = $CurrentHandler['pluginName'];
Example #6
0
<?php

// Protect against hack attempts
if (!defined('NGCMS')) {
    die('HAL');
}
plugins_load_config();
LoadPluginLang('guestbook', 'config', '', 'gbconfig', '#');
switch ($_REQUEST['action']) {
    case 'manage_fields':
        manage_fields();
        break;
    case 'add_field':
        add_field();
        break;
    case 'edit_field':
        edit_field();
        break;
    case 'drop_field':
        drop_field();
        manage_fields();
        break;
    case 'insert_field':
        $result = insert_field();
        if ($result === TRUE) {
            manage_fields();
        } else {
            add_field();
        }
        break;
    case 'update_field':
Example #7
0
<?php

plugins_load_config();
LoadPluginLang('messaging', 'messaging', '', 'mes');
$cfg = array();
array_push($cfg, array('descr' => $lang['mes_descr']));
array_push($cfg, array('name' => 'subject', 'title' => $lang['mes_subject'], 'type' => 'input', 'html_flags' => 'size=70', 'value' => ''));
array_push($cfg, array('name' => 'content', 'title' => $lang['mes_content'], 'type' => 'text', 'html_flags' => 'rows=10 cols=110 name=content id=content', 'value' => ''));
if ($_REQUEST['action'] == 'commit') {
    messaging($_REQUEST['subject'], $_REQUEST['content']);
} else {
    generate_config_page('messaging', $cfg);
}
Example #8
0
<?php

// Protect against hack attempts
if (!defined('NGCMS')) {
    die('HAL');
}
register_plugin_page('guestbook', '', 'guestbook_list');
register_plugin_page('guestbook', 'edit', 'guestbook_edit');
register_plugin_page('guestbook', 'social', 'guestbook_social');
LoadPluginLang('guestbook', 'main', '', '', '#');
switch ($_REQUEST['action']) {
    case 'add':
        msg_add_submit();
        break;
    case 'edit':
        msg_edit_submit();
        break;
    case 'delete':
        msg_delete_submit();
        break;
}
/*
 * Add message submit callback
 */
function msg_add_submit()
{
    global $template, $tpl, $twig, $userROW, $ip, $config, $mysql, $SYSTEM_FLAGS, $TemplateCache, $lang;
    $errors = array();
    // anonymous user
    if (!is_array($userROW)) {
        $_POST['author'] = secure_html(convert(trim($_POST['author'])));