Пример #1
0
             foreach ($_POST['sel_user'] as $modMemberUID) {
                 $modMemberUID = COM_applyFilter($modMemberUID, true);
                 $modMemberName = DB_getItem($_TABLES['users'], "username", "uid='{$modMemberUID}'");
                 foreach ($_POST['sel_forum'] as $modForum) {
                     $modForum = COM_applyFilter($modForum, true);
                     $modquery = DB_query("SELECT * FROM {$_TABLES['forum_moderators']} WHERE mod_uid='{$modMemberUID}' AND mod_forum='{$modForum}'");
                     if (DB_numrows($modquery) == 1) {
                         DB_query("DELETE FROM {$_TABLES['forum_moderators']} WHERE mod_uid='{$modMemberUID}' AND mod_forum='{$modForum}'");
                     }
                     $fields = 'mod_username,mod_uid,mod_groupid, mod_forum,mod_delete,mod_ban,mod_edit,mod_move,mod_stick';
                     $values = "'{$modMemberName}','{$modMemberUID}','0', '{$modForum}','{$mod_delete}','{$mod_ban}','{$mod_edit}','{$mod_move}','{$mod_stick}'";
                     DB_query("INSERT INTO {$_TABLES['forum_moderators']} ({$fields}) VALUES ({$values})");
                 }
             }
         } elseif ($_POST['modtype'] == 'group' and $_POST['sel_group'] > 0) {
             $modGroupid = COM_applyfilter($_POST['sel_group'], true);
             foreach ($_POST['sel_forum'] as $modForum) {
                 $modForum = COM_applyFilter($modForum, true);
                 $modquery = DB_query("SELECT * FROM {$_TABLES['forum_moderators']} WHERE mod_groupid='{$modGroupid}' AND mod_forum='{$modForum}'");
                 if (DB_numrows($modquery) == 1) {
                     DB_query("DELETE FROM {$_TABLES['forum_moderators']} WHERE mod_groupid='{$modGroupid}' AND mod_forum='{$modForum}'");
                 }
                 $fields = 'mod_username,mod_uid,mod_groupid, mod_forum,mod_delete,mod_ban,mod_edit,mod_move,mod_stick';
                 $values = "'','0','{$modGroupid}', '{$modForum}','{$mod_delete}','{$mod_ban}','{$mod_edit}','{$mod_move}','{$mod_stick}'";
                 DB_query("INSERT INTO {$_TABLES['forum_moderators']} ({$fields}) VALUES ({$values})");
             }
         }
     }
 }
 header("Location: mods.php");
 exit;
Пример #2
0
    $process = COM_applyFilter($_POST['sprocessid'], true);
    $singletask = 1;
} else {
    $process = COM_applyfilter($_GET['process'], true);
    $singletask = COM_applyfilter($_GET['singletask'], true);
}
if (isset($_POST['staskid'])) {
    $task = COM_applyFilter($_POST['staskid'], true);
    $singletask = 1;
} else {
    $task = COM_applyfilter($_GET['task'], true);
    $singletask = COM_applyfilter($_GET['singletask'], true);
}
$rev = COM_applyfilter($_GET['rev'], true);
$op = COM_applyfilter($_GET['op']);
$singleuse = COM_applyfilter($_REQUEST['singleuse'], true);
$taskStatus = array(0 => 'Un-completed', 1 => 'Completed', 2 => 'On-hold', 3 => 'Cancelled', 4 => 'If Condition False');
// Retrieve the last workflow queue records
function wfBuildSQLstatement($taskid, $processid, $revdirection, $singletask, $op = '')
{
    global $_TABLES;
    $sql = "SELECT a.id, a.status, a.archived, a.uid, a.nf_templateDataID, a.nf_processID, a.createdDate, a.completedDate, c.function, ";
    $sql .= "c.nf_templateID, c.taskname, c.nf_stepType, e.stepType as tasktype, a.nf_processID, b.pid, c.assignedByVariable, ";
    $sql .= "c.nf_handlerid, c.logicalID, c.assignedByVariable, c.function, c.formid,d.templateName ";
    $sql .= "FROM {$_TABLES['nf_queue']} a INNER JOIN {$_TABLES['nf_process']} b ON a.nf_processId = b.id ";
    $sql .= "INNER JOIN {$_TABLES['nf_templatedata']} c ON a.nf_templateDataId = c.id ";
    $sql .= "INNER JOIN {$_TABLES['nf_template']} d ON b.nf_templateId = d.id ";
    $sql .= "LEFT JOIN {$_TABLES['nf_steptype']} e on c.nf_stepType=e.id ";
    if ($op == '') {
        if ($processid > 0) {
            $sql .= "WHERE nf_processID = {$processid} ";
Пример #3
0
*/
/**
* Geeklog common function library
*/
require_once '../lib-common.php';
if (!in_array('staticpages', $_PLUGINS)) {
    COM_handle404();
    exit;
}
// MAIN
COM_setArgNames(array('page', 'disp_mode'));
$page = COM_applyFilter(COM_getArgument('page'));
$display_mode = COM_applyFilter(COM_getArgument('disp_mode'));
$query = '';
if (isset($_REQUEST['query'])) {
    $query = COM_applyfilter($_GET['query']);
}
TOPIC_getTopic('staticpages', $page);
// from comments display refresh:
if (isset($_REQUEST['order'])) {
    $comment_order = COM_applyFilter($_REQUEST['order']);
    $comment_mode = COM_applyFilter($_REQUEST['mode']);
    if (isset($_REQUEST['cpage'])) {
        $comment_page = COM_applyFilter($_REQUEST['cpage']);
    }
    if (strcasecmp($comment_order, 'ASC') != 0 && strcasecmp($comment_order, 'DESC') != 0) {
        $comment_order = '';
    }
} else {
    $comment_order = '';
    $comment_mode = '';
Пример #4
0
// | of the License, or (at your option) any later version.                    |
// |                                                                           |
// | 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.           |
// |                                                                           |
// +---------------------------------------------------------------------------+
//
include '../lib-common.php';
$fid = COM_applyfilter($_GET['fid'], true);
$op = COM_applyfilter($_GET['op']);
COM_errorLog("Download.php - op:{$op}, uid:{$_USER['uid']}, fid:{$fid}");
if ($op == 'incoming') {
    if (!DB_count($_TABLES['nxfile_import_queue'], 'id', $fid)) {
        echo COM_refresh($_CONF['site_url'] . '?msg=1&plugin=nexfile');
        exit;
    }
}
if ($op == 'download') {
    if (!DB_count($_TABLES['nxfile_files'], 'fid', $fid)) {
        echo COM_refresh($_CONF['site_url'] . '?msg=1&plugin=nexfile');
        exit;
    }
    include_once $_CONF['path_system'] . 'classes/downloader.class.php';
    $version = COM_applyBasicFilter($_GET['version'], true);
    if ($version > 0) {
Пример #5
0
            $notify_val = 'checked="checked"';
        }
    } else {
        alertMessage($LANG_GF02['msg72'], $LANG_GF02['msg191']);
        exit;
    }
}
// PREVIEW TOPIC
$numAttachments = 0;
if ($_REQUEST['preview'] == $LANG_GF01['PREVIEW']) {
    $previewitem = array();
    if ($method == 'edit') {
        $previewitem['uid'] = $edittopic['uid'];
        $previewitem['name'] = $edittopic['name'];
        /* Check for any uploaded files */
        $editpost = COM_applyfilter($_POST['id'], true);
        $previewitem['id'] = $editpost;
        gf_check4files($editpost);
        $numAttachments = DB_count($_TABLES['gf_attachments'], 'topic_id', $editpost);
    } else {
        if ($uid > 1) {
            $previewitem['name'] = stripslashes($_POST['aname']);
            $previewitem['uid'] = $_USER['uid'];
        } else {
            $previewitem['name'] = stripslashes(urldecode($_POST['aname']));
            $previewitem['uid'] = 1;
        }
        /* Check for any uploaded files */
        gf_check4files($_POST['uniqueid'], true);
        $numAttachments = DB_count($_TABLES['gf_attachments'], array('topic_id', 'tempfile'), array($_POST['uniqueid'], 1));
    }
Пример #6
0
            $reportpage->set_var('delete_link', '');
            $reportpage->set_var('edit_link', '');
        }
        $i = $i == 2 ? 1 : 2;
        $reportpage->parse('report_records', 'records', true);
    }
    // while
    $reportpage->parse('output', 'page');
    $retval = $reportpage->finish($reportpage->get_var('output'));
    return $retval;
}
/* Main Code begin */
$LANG_NAVBAR = $LANG_FRM_ADMIN_NAVBAR;
$formname = DB_getItem($_TABLES['nxform_definitions'], 'name', "id='{$formid}'");
$sdate = COM_applyfilter($_REQUEST['sdate']);
$edate = COM_applyfilter($_REQUEST['edate']);
/* TODO: Fix date convert. I changed the format to MM/DD/YYYY (Blaine: Aug 23/2005) */
if ($sdate != '') {
    $sconvdate = ppConvertDate($sdate);
}
if ($edate != '') {
    $econvdate = ppConvertDate($edate);
}
switch ($op) {
    case 'view':
        if ($noheader == 0) {
            $navbar = new navbar();
            if ($editrights) {
                $navbar->add_menuitem($LANG_NAVBAR['1'], $_CONF['site_admin_url'] . '/plugins/nexform/index.php');
            }
            $navbar->add_menuitem($LANG_NAVBAR['9'], $_CONF['site_admin_url'] . '/plugins/nexform/report.php?formid=' . $formid);