Example #1
0
 function main($action)
 {
     global $db, $cache, $config, $images, $user, $lang, $bbcode, $pafiledb_config, $template, $pafiledb_functions;
     @(include_once IP_ROOT_PATH . 'includes/bbcode.' . PHP_EXT);
     $cat_id = request_var('cat_id', 0);
     $file_id = request_var('file_id', 0);
     $action = request_var('action', '');
     if ($file_id == 0 && $action != '') {
         $file_id_array = array();
         $file_id_array = explode('=', $action);
         $file_id = $file_id_array[1];
     }
     if (empty($file_id)) {
         message_die(GENERAL_MESSAGE, $lang['File_not_exist']);
     }
     // =======================================================
     // file id is not set, give him/her a nice error message
     // =======================================================
     $sql = "SELECT f.*, AVG(r.rate_point) AS rating, COUNT(r.votes_file) AS total_votes, u.user_id, u.username, u.user_active, u.user_color, COUNT(c.comments_id) as total_comments\n\t\t\tFROM " . PA_FILES_TABLE . " AS f\n\t\t\t\tLEFT JOIN " . PA_VOTES_TABLE . " AS r ON f.file_id = r.votes_file\n\t\t\t\tLEFT JOIN " . USERS_TABLE . " AS u ON f.user_id = u.user_id\n\t\t\t\tLEFT JOIN " . PA_COMMENTS_TABLE . " AS c ON f.file_id = c.file_id\n\t\t\tWHERE f.file_id = " . (int) $file_id . "\n\t\t\tAND f.file_approved = 1\n\t\t\tGROUP BY f.file_id ";
     $result = $db->sql_query($sql);
     //===================================================
     // file doesn't exist'
     //===================================================
     if (!($file_data = $db->sql_fetchrow($result))) {
         message_die(GENERAL_MESSAGE, $lang['File_not_exist']);
     }
     $db->sql_freeresult($result);
     //===================================================
     // Pafiledb auth for viewing file
     //===================================================
     if (!$this->auth[$file_data['file_catid']]['auth_view_file']) {
         if (!$user->data['session_logged_in']) {
             redirect(append_sid(CMS_PAGE_LOGIN . '?redirect=dload.' . PHP_EXT . '&action=file&file_id=' . $file_id, true));
         }
         $message = sprintf($lang['Sorry_auth_view'], $this->auth[$file_data['file_catid']]['auth_view_file_type']);
         message_die(GENERAL_MESSAGE, $message);
     }
     $this->generate_category_nav($file_data['file_catid']);
     $template->assign_vars(array('L_INDEX' => sprintf($lang['Forum_Index'], $config['sitename']), 'L_HOME' => $lang['Home'], 'CURRENT_TIME' => sprintf($lang['Current_time'], create_date($config['default_dateformat'], time(), $config['board_timezone'])), 'U_INDEX_HOME' => append_sid(CMS_PAGE_HOME), 'U_DOWNLOAD_HOME' => append_sid('dload.' . PHP_EXT), 'FILE_NAME' => $file_data['file_name'], 'DOWNLOAD' => $pafiledb_config['settings_dbname']));
     //===================================================
     // Prepare file info to display them
     //===================================================
     $file_time = create_date_ip($config['default_dateformat'], $file_data['file_time'], $config['board_timezone']);
     $file_last_download = $file_data['file_last'] ? create_date_ip($config['default_dateformat'], $file_data['file_last'], $config['board_timezone']) : $lang['never'];
     $file_update_time = $file_data['file_update_time'] ? create_date_ip($config['default_dateformat'], $file_data['file_update_time'], $config['board_timezone']) : $lang['never'];
     $file_author = trim($file_data['file_creator']);
     $file_version = trim($file_data['file_version']);
     $file_screenshot_url = trim($file_data['file_ssurl']);
     $file_website_url = trim($file_data['file_docsurl']);
     //$file_rating = ($file_data['rating'] != 0) ? round($file_data['rating'], 2) . ' / 10' : $lang['Not_rated'];
     //$file_rating2 = ($file_data['rating'] != 0) ? sprintf("%.1f", round(($file_data['rating']), 2)/2) : '0.0';
     $file_rating2 = $file_data['rating'] != 0 ? sprintf("%.1f", round($file_data['rating'], 0) / 2) : '0.0';
     $file_download_link = $file_data['file_license'] > 0 ? append_sid('dload.' . PHP_EXT . '?action=license&license_id=' . $file_data['file_license'] . '&file_id=' . $file_id) : append_sid('dload.' . PHP_EXT . '?action=download&file_id=' . $file_id);
     $file_size = $pafiledb_functions->get_file_size($file_id, $file_data);
     /*
     $file_poster = ($file_data['user_id'] != ANONYMOUS) ? '<a href="' . append_sid(CMS_PAGE_PROFILE.'?mode=viewprofile&amp;' . POST_USERS_URL . '=' . $file_data['user_id']) . '">' : '';
     $file_poster .= ($file_data['user_id'] != ANONYMOUS) ? $file_data['username'] : $lang['Guest'];
     $file_poster .= ($file_data['user_id'] != ANONYMOUS) ? '</a>' : '';
     */
     $file_poster = $file_data['user_id'] == ANONYMOUS ? $lang['Guest'] : colorize_username($file_data['user_id'], $file_data['username'], $file_data['user_color'], $file_data['user_active']);
     $bbcode->allow_html = $config['allow_html'] ? true : false;
     $bbcode->allow_bbcode = $config['allow_bbcode'] ? true : false;
     $bbcode->allow_smilies = $config['allow_smilies'] ? true : false;
     $file_long_desc = $bbcode->parse($file_data['file_longdesc']);
     $template->assign_vars(array('L_CLICK_HERE' => $lang['Click_here'], 'L_AUTHOR' => $lang['Creator'], 'L_VERSION' => $lang['Version'], 'L_SCREENSHOT' => $lang['Scrsht'], 'L_WEBSITE' => $lang['Docs'], 'L_FILE' => $lang['File'], 'L_EDIT' => $lang['Editfile'], 'L_DELETE' => $lang['Deletefile'], 'L_DESC' => $lang['Desc'], 'L_VOTES' => $lang['Votes'], 'L_DATE' => $lang['Date'], 'L_UPDATE_TIME' => $lang['Update_time'], 'L_LASTTDL' => $lang['Lastdl'], 'L_DLS' => $lang['Dls'], 'L_RATING' => $lang['DlRating'], 'L_SIZE' => $lang['File_size'], 'L_DOWNLOAD' => $lang['Downloadfile'], 'L_RATE' => $lang['Rate'], 'L_EMAIL' => $lang['Emailfile'], 'L_SUBMITED_BY' => $lang['Submiter'], 'SHOW_AUTHOR' => !empty($file_author) ? true : false, 'SHOW_VERSION' => !empty($file_version) ? true : false, 'SHOW_SCREENSHOT' => !empty($file_screenshot_url) ? true : false, 'SHOW_WEBSITE' => !empty($file_website_url) ? true : false, 'SS_AS_LINK' => $file_data['file_sshot_link'] ? true : false, 'FILE_NAME' => $file_data['file_name'], 'FILE_LONGDESC' => $file_long_desc, 'FILE_SUBMITED_BY' => $file_poster, 'FILE_AUTHOR' => $file_author, 'FILE_VERSION' => $file_version, 'FILE_SCREENSHOT' => $file_screenshot_url, 'FILE_WEBSITE' => $file_website_url, 'AUTH_EDIT' => $this->auth[$file_data['file_catid']]['auth_edit_file'] && $file_data['user_id'] == $user->data['user_id'] || $this->auth[$file_data['file_catid']]['auth_mod'] ? true : false, 'AUTH_DELETE' => $this->auth[$file_data['file_catid']]['auth_delete_file'] && $file_data['user_id'] == $user->data['user_id'] || $this->auth[$file_data['file_catid']]['auth_mod'] ? true : false, 'AUTH_DOWNLOAD' => $this->auth[$file_data['file_catid']]['auth_download'] ? true : false, 'AUTH_RATE' => $this->auth[$file_data['file_catid']]['auth_rate'] ? true : false, 'AUTH_EMAIL' => $this->auth[$file_data['file_catid']]['auth_email'] ? true : false, 'INCLUDE_COMMENTS' => $this->auth[$file_data['file_catid']]['auth_view_comment'] ? true : false, 'DELETE_IMG' => $images['icon_delpost'], 'EDIT_IMG' => $images['icon_edit'], 'DOWNLOAD_IMG' => $images['pa_download'], 'RATE_IMG' => $images['pa_rate'], 'EMAIL_IMG' => $images['pa_email'], 'FILE_VOTES' => $file_data['total_votes'], 'TIME' => $file_time, 'UPDATE_TIME' => $file_data['file_update_time'] != $file_data['file_time'] ? $file_update_time : $lang['never'], 'RATING' => $file_rating2, 'FILE_DLS' => intval($file_data['file_dls']), 'FILE_SIZE' => $file_size, 'LAST' => $file_last_download, 'U_DELETE' => append_sid('dload.' . PHP_EXT . '?action=user_upload&amp;do=delete&amp;file_id=' . $file_id), 'U_EDIT' => append_sid('dload.' . PHP_EXT . '?action=user_upload&amp;file_id=' . $file_id), 'U_DOWNLOAD' => $file_download_link, 'U_RATE' => append_sid('dload.' . PHP_EXT . '?action=rate&amp;file_id=' . $file_id), 'U_EMAIL' => append_sid('dload.' . PHP_EXT . '?action=email&amp;file_id=' . $file_id)));
     $custom_fields = new custom_fields();
     $custom_fields->custom_table = PA_CUSTOM_TABLE;
     $custom_fields->custom_data_table = PA_CUSTOM_DATA_TABLE;
     $custom_fields->init();
     $custom_fields->display_data($file_id);
     if ($this->auth[$file_data['file_catid']]['auth_view_comment']) {
         include IP_ROOT_PATH . PA_FILE_DB_PATH . 'functions_comment.' . PHP_EXT;
         display_comments($file_data);
     }
     $this->display($lang['Download'], 'pa_file_body.tpl');
 }
 public function save()
 {
     if (isset($_POST['delete_' . $this->name])) {
         $last_data = get_post_meta($this->post_id, $this->name, true);
         if ($last_data == "") {
             $last_data = false;
         }
         if ($last_data !== false) {
             custom_fields::remove_image($this->field['directory'], $last_data);
             update_post_meta($this->post_id, $this->name, "");
         }
     }
     if (isset($_FILES[$this->name])) {
         $file = $_FILES[$this->name];
         $data = custom_fields::upload_file($file, $this->field['directory']);
         if (strlen($data) > 0) {
             update_post_meta($this->post_id, $this->name, $data);
         }
         unset($_FILES[$this->name]);
     }
 }
Example #3
0
$GO_HEADER['head'] .= $overlib->get_header();
require $GO_THEME->theme_path . "header.inc";
echo '<form name="add" method="post" action="' . $_SERVER['PHP_SELF'] . '">';
echo '<input type="hidden" value="' . $contact["source_id"] . '" name="source_id" />';
echo '<input type="hidden" name="task" value="" />';
echo '<input type="hidden" name="close" value="false" />';
echo '<input type="hidden" name="return_to" value="' . $return_to . '" />';
echo '<input type="hidden" name="contact_id" value="' . $contact_id . '" />';
echo '<table border="0"><tr>';
$title = $contact_id > 0 ? $ab_contact : $contacts_add;
$tabtable = new tabtable('contact_table', $title, '100%', '400', '120', '', true, 'left', 'top', 'add', 'vertical');
if ($contact_id > 0) {
    $tabtable->add_tab('profile', $contact_profile);
    if ($custom_fields_plugin) {
        require_once $custom_fields_plugin['path'] . 'classes/custom_fields.class.inc';
        $cf = new custom_fields('ab_custom_contact_fields');
        if ($cf->get_catagories($GO_SECURITY->user_id) > 0) {
            while ($cf->next_record()) {
                $tabtable->add_tab($cf->f('id'), $cf->f('name'));
            }
        }
    }
    $projects_module = $GO_MODULES->get_module('projects');
    if ($projects_module) {
        if ($GO_SECURITY->has_permission($GO_SECURITY->user_id, $projects_module['acl_read']) || $GO_SECURITY->has_permission($GO_SECURITY->user_id, $projects_module['acl_write'])) {
            $tabtable->add_tab('projects', $lang_modules['projects']);
        }
    }
    $notes_module = $GO_MODULES->get_module('notes');
    if ($notes_module) {
        if ($GO_SECURITY->has_permission($GO_SECURITY->user_id, $notes_module['acl_read']) || $GO_SECURITY->has_permission($GO_SECURITY->user_id, $notes_module['acl_write'])) {
*/
define('IN_ICYPHOENIX', true);
if (!empty($setmodules)) {
    $file = basename(__FILE__);
    $module['2000_Downloads']['140_Mfieldtitle'] = $file;
    return;
}
if (!defined('IP_ROOT_PATH')) {
    define('IP_ROOT_PATH', './../');
}
if (!defined('PHP_EXT')) {
    define('PHP_EXT', substr(strrchr(__FILE__, '.'), 1));
}
require 'pagestart.' . PHP_EXT;
include IP_ROOT_PATH . 'includes/pafiledb_common.' . PHP_EXT;
$custom_fields = new custom_fields();
$custom_fields->custom_table = PA_CUSTOM_TABLE;
$custom_fields->custom_data_table = PA_CUSTOM_DATA_TABLE;
$custom_fields->init();
// MX Modified - select
$mode = request_var('mode', 'select');
$field_id = request_var('field_id', 0);
$field_ids = request_var('field_ids', array(''));
$field_type = request_var('field_type', 0);
if (empty($field_type)) {
    $field_type = $custom_fields->field_rowset[$field_id]['field_type'];
}
$submit = isset($_POST['submit']) ? true : false;
switch ($mode) {
    case 'addfield':
        $template_file = ADM_TPL . 'pa_admin_field_add.tpl';
Example #5
0
    function main($action)
    {
        global $pafiledb_config, $pafiledb_functions, $template;
        global $db, $cache, $config, $lang, $user;
        // =======================================================
        // Get Vars
        // =======================================================
        $custom_fields = new custom_fields();
        $custom_fields->custom_table = PA_CUSTOM_TABLE;
        $custom_fields->custom_data_table = PA_CUSTOM_DATA_TABLE;
        $custom_fields->init();
        $cat_id = request_var('cat_id', 0);
        // MX Addon
        $do = request_var('do', '');
        $file_id = request_var('file_id', 0);
        // END
        $mirrors = isset($_POST['mirrors']) ? true : 0;
        $dropmenu = !$cat_id ? $this->jumpmenu_option(0, 0, '', true, true) : $this->jumpmenu_option(0, 0, array($cat_id => 1), true, true);
        if (!empty($cat_id)) {
            if (!$this->auth[$cat_id]['auth_upload']) {
                if (!$user->data['session_logged_in']) {
                    redirect(append_sid(CMS_PAGE_LOGIN . '?redirect=dload.' . PHP_EXT . '&action=user_upload&cat_id=' . $cat_id, true));
                }
                $message = sprintf($lang['Sorry_auth_upload'], $this->auth[$cat_id]['auth_upload_type']);
                message_die(GENERAL_MESSAGE, $message);
            }
        } else {
            if (empty($dropmenu)) {
                if (!$user->data['session_logged_in']) {
                    redirect(append_sid(CMS_PAGE_LOGIN . '?redirect=dload.' . PHP_EXT . '&action=user_upload', true));
                }
                $message = sprintf($lang['Sorry_auth_upload'], $this->auth[$cat_id]['auth_upload_type']);
                message_die(GENERAL_MESSAGE, $message);
            }
        }
        // =======================================================
        // MX Addon
        // =======================================================
        if ($do == 'delete') {
            $sql = "SELECT * FROM " . PA_FILES_TABLE . " WHERE file_id = " . $file_id;
            $result = $db->sql_query($sql);
            $file_info = $db->sql_fetchrow($result);
            if ($this->auth[$file_info['file_catid']]['auth_delete_file'] && $file_info['user_id'] == $user->data['user_id'] || $this->auth[$file_info['file_catid']]['auth_mod']) {
                $this->delete_files($file_id);
                $this->_pafiledb();
                $message = $lang['Filedeleted'] . '<br /><br />' . sprintf($lang['Click_return'], '<a href="' . append_sid('dload.php') . '">', '</a>');
                message_die(GENERAL_MESSAGE, $message);
            } else {
                $message = sprintf($lang['Sorry_auth_delete'], $this->auth[$cat_id]['auth_upload_type']);
                message_die(GENERAL_MESSAGE, $message);
            }
        }
        // =======================================================
        // IF submit then upload the file and update the sql for it
        // =======================================================
        if (isset($_POST['submit'])) {
            if (!$file_id) {
                $temp_id = $this->update_add_file();
                $custom_fields->file_update_data($temp_id);
                $this->_pafiledb();
                if ($pafiledb_config['need_validation'] == '0') {
                    $message = $lang['Fileadded'] . '<br /><br />' . sprintf($lang['Click_return'], '<a href="' . append_sid('dload.' . PHP_EXT . '?action=file&amp;file_id=' . $temp_id) . '">', '</a>');
                } else {
                    $message = $lang['Fileadded_not_validated'] . '<br /><br />' . sprintf($lang['Click_return'], '<a href="' . append_sid('dload.' . PHP_EXT . '?action=category&amp;cat_id=' . $cat_id) . '">', '</a>');
                }
                //				$mode = 'edit';
            } elseif ($file_id != '') {
                $file_id = $this->update_add_file($file_id);
                $custom_fields->file_update_data($file_id);
                $this->_pafiledb();
                $message = $lang['Fileedited'] . '<br /><br />' . sprintf($lang['Click_return'], '<a href="' . append_sid('dload.' . PHP_EXT . '?action=file&amp;file_id=' . $file_id) . '">', '</a>');
                //				$mode = 'edit';
            }
            $message .= '<br /><br />' . sprintf($lang['Click_return_upload'], '<a href="' . append_sid('dload.' . PHP_EXT . '?action=user_upload') . '">', '</a>');
            message_die(GENERAL_MESSAGE, $message);
        } else {
            if (!$file_id) {
                $file_name = '';
                $file_desc = '';
                $file_long_desc = '';
                $file_author = '';
                $file_version = '';
                $file_website = '';
                $file_posticons = $pafiledb_functions->post_icons();
                //$file_cat_list = $this->jumpmenu_option(0, 0, '', true);
                $file_cat_list = !$cat_id ? $this->jumpmenu_option(0, 0, '', true) : $this->jumpmenu_option(0, 0, array($cat_id => 1), true, true);
                $file_license = $pafiledb_functions->license_list();
                $pin_checked_yes = '';
                $pin_checked_no = ' checked="checked"';
                $file_download = 0;
                $approved_checked_yes = '';
                $approved_checked_no = ' checked="checked"';
                $file_ssurl = '';
                $ss_checked_yes = '';
                $ss_checked_no = ' checked="checked"';
                $file_url = '';
                $custom_exist = $custom_fields->display_edit();
                $mode = 'ADD';
                $l_title = $lang['Afiletitle'];
            } elseif ($file_id != '') {
                $sql = 'SELECT *
					FROM ' . PA_FILES_TABLE . "\n\t\t\t\t\tWHERE file_id = {$file_id}";
                $result = $db->sql_query($sql);
                $file_info = $db->sql_fetchrow($result);
                // AUTH CHECK
                if (!($this->auth[$file_info['file_catid']]['auth_edit_file'] && $file_info['user_id'] == $user->data['user_id'] || $this->auth[$file_info['file_catid']]['auth_mod'])) {
                    $message = sprintf($lang['Sorry_auth_edit'], $this->auth[$cat_id]['auth_upload_type']);
                    message_die(GENERAL_MESSAGE, $message);
                }
                $file_name = $file_info['file_name'];
                $file_desc = $file_info['file_desc'];
                $file_long_desc = $file_info['file_longdesc'];
                $file_author = $file_info['file_creator'];
                $file_version = $file_info['file_version'];
                $file_website = $file_info['file_docsurl'];
                $file_posticons = $pafiledb_functions->post_icons($file_info['file_posticon']);
                $file_cat_list = $this->jumpmenu_option(0, 0, array($file_info['file_catid'] => 1), true);
                $file_license = $pafiledb_functions->license_list($file_info['file_license']);
                $pin_checked_yes = $file_info['file_pin'] ? ' checked="checked"' : '';
                $pin_checked_no = !$file_info['file_pin'] ? ' checked="checked"' : '';
                $file_download = intval($file_info['file_dls']);
                $approved_checked_yes = $file_info['file_approved'] ? ' checked="checked"' : '';
                $approved_checked_no = !$file_info['file_approved'] ? ' checked="checked"' : '';
                // MX addon
                $file_approved = $file_info['file_approved'] == '1' ? 1 : 0;
                $file_ssurl = $file_info['file_ssurl'];
                $ss_checked_yes = $file_info['file_sshot_link'] ? ' checked="checked"' : '';
                $ss_checked_no = !$file_info['file_sshot_link'] ? ' checked="checked"' : '';
                $file_url = $file_info['file_dlurl'];
                $file_unique_name = $file_info['unique_name'];
                $file_dir = $file_info['file_dir'];
                $custom_exist = $custom_fields->display_edit($file_id);
                $mode = 'EDIT';
                $l_title = $lang['Efiletitle'];
                $s_hidden_fields = '<input type="hidden" name="file_id" value="' . $file_id . '" />';
            }
            $s_hidden_fields .= '<input type="hidden" name="action" value="user_upload" />';
            $template->assign_vars(array('S_ADD_FILE_ACTION' => append_sid('dload.' . PHP_EXT), 'L_HOME' => $lang['Home'], 'DOWNLOAD' => $pafiledb_config['settings_dbname'], 'FILESIZE' => intval($pafiledb_config['max_file_size']), 'FILE_NAME' => $file_name, 'FILE_DESC' => $file_desc, 'FILE_LONG_DESC' => $file_long_desc, 'FILE_AUTHOR' => $file_author, 'FILE_VERSION' => $file_version, 'FILE_SSURL' => $file_ssurl, 'FILE_WEBSITE' => $file_website, 'FILE_DLURL' => $file_url, 'FILE_DOWNLOAD' => $file_download, 'CUSTOM_EXIST' => $custom_exist, 'AUTH_APPROVAL' => false, 'APPROVED_CHECKED_YES' => $approved_checked_yes, 'APPROVED_CHECKED_NO' => $approved_checked_no, 'SS_CHECKED_YES' => $ss_checked_yes, 'SS_CHECKED_NO' => $ss_checked_no, 'PIN_CHECKED_YES' => $pin_checked_yes, 'PIN_CHECKED_NO' => $pin_checked_no, 'L_HOME' => $lang['Home'], 'CURRENT_TIME' => sprintf($lang['Current_time'], create_date($config['default_dateformat'], time(), $config['board_timezone'])), 'L_INDEX' => sprintf($lang['Forum_Index'], $config['sitename']), 'L_UPLOAD' => $lang['User_upload'], 'L_FILE_TITLE' => $l_title, 'L_FILE_APPROVED' => $lang['Approved'], 'L_FILE_APPROVED_INFO' => $lang['Approved_info'], 'L_ADDTIONAL_FIELD' => $lang['Addtional_field'], 'L_SCREENSHOT' => $lang['Scrsht'], 'L_FILES' => $lang['Files'], 'L_FILE_NAME' => $lang['Filename'], 'L_FILE_NAME_INFO' => $lang['Filenameinfo'], 'L_FILE_SHORT_DESC' => $lang['Filesd'], 'L_FILE_SHORT_DESC_INFO' => $lang['Filesdinfo'], 'L_FILE_LONG_DESC' => $lang['Fileld'], 'L_FILE_LONG_DESC_INFO' => $lang['Fileldinfo'], 'L_FILE_AUTHOR' => $lang['Filecreator'], 'L_FILE_AUTHOR_INFO' => $lang['Filecreatorinfo'], 'L_FILE_VERSION' => $lang['Fileversion'], 'L_FILE_VERSION_INFO' => $lang['Fileversioninfo'], 'L_FILESS' => $lang['Filess'], 'L_FILESSINFO' => $lang['Filessinfo'], 'L_FILESS_UPLOAD' => $lang['Filess_upload'], 'L_FILESSINFO_UPLOAD' => $lang['Filessinfo_upload'], 'L_FILE_SSLINK' => $lang['Filess_link'], 'L_FILE_SSLINK_INFO' => $lang['Filess_link_info'], 'L_FILESSUPLOAD' => $lang['Filessupload'], 'L_FILE_WEBSITE' => $lang['Filedocs'], 'L_FILE_WEBSITE_INFO' => $lang['Filedocsinfo'], 'L_FILE_URL' => $lang['Fileurl'], 'L_FILE_UPLOAD' => $lang['File_upload'], 'L_FILEINFO_UPLOAD' => $lang['Fileinfo_upload'], 'L_FILE_URL_INFO' => $lang['Fileurlinfo'], 'L_FILE_POSTICONS' => $lang['Filepi'], 'L_FILE_POSTICONS_INFO' => $lang['Filepiinfo'], 'L_FILE_CAT' => $lang['Filecat'], 'L_FILE_CAT_INFO' => $lang['Filecatinfo'], 'L_FILE_LICENSE' => $lang['Filelicense'], 'L_NONE' => $lang['None'], 'L_FILE_LICENSE_INFO' => $lang['Filelicenseinfo'], 'L_FILE_PINNED' => $lang['Filepin'], 'L_FILE_PINNED_INFO' => $lang['Filepininfo'], 'L_FILE_DOWNLOAD' => $lang['Filedls'], 'L_NO' => $lang['No'], 'L_YES' => $lang['Yes'], 'S_POSTICONS' => $file_posticons, 'S_LICENSE_LIST' => $file_license, 'S_CAT_LIST' => $file_cat_list, 'S_HIDDEN_FIELDS' => $s_hidden_fields, 'MODE' => $mode, 'U_INDEX_HOME' => append_sid(CMS_PAGE_HOME), 'U_DOWNLOAD' => append_sid('dload.' . PHP_EXT)));
            $this->display($lang['Download'] . ' :: ' . $lang['User_upload'], 'pa_file_add.tpl');
        }
    }
Example #6
0
 case 'contacts':
     $search_field = $ab_settings['search_contacts_field'];
     $dropbox->add_value('ab_contacts.first_name', $strFirstName);
     $dropbox->add_value('ab_contacts.last_name', $strLastName);
     $dropbox->add_value('ab_contacts.email', $strEmail);
     $dropbox->add_value('ab_contacts.department', $strDepartment);
     $dropbox->add_value('ab_contacts.function', $strFunction);
     $dropbox->add_value('ab_contacts.address', $strAddress);
     $dropbox->add_value('ab_contacts.city', $strCity);
     $dropbox->add_value('ab_contacts.zip', $strZip);
     $dropbox->add_value('ab_contacts.state', $strState);
     $dropbox->add_value('ab_contacts.country', $strCountry);
     $dropbox->add_value('ab_contacts.comment', $ab_comment);
     if ($custom_fields_plugin) {
         require_once $custom_fields_plugin['class_path'] . 'custom_fields.class.inc';
         $cf = new custom_fields('ab_custom_contact_fields');
         if ($cf->get_fields()) {
             while ($cf->next_record()) {
                 $dropbox->add_value('ab_custom_contact_fields.`' . $cf->f('field') . '`', $cf->f('field'));
             }
         }
     }
     break;
 case 'users':
     $_search_field = isset($_POST['search_field']) ? $_POST['search_field'] : 'users.first_name';
     $search_field = isset($ab_settings['search_users_field']) ? $ab_settings['search_users_field'] : $_search_field;
     $dropbox->add_value('users.first_name', $strFirstName);
     $dropbox->add_value('users.last_name', $strLastName);
     $dropbox->add_value('users.email', $strEmail);
     $dropbox->add_value('users.department', $strDepartment);
     $dropbox->add_value('users.function', $strFunction);
Example #7
0
*/
define('IN_ICYPHOENIX', true);
if (!empty($setmodules)) {
    $file = basename(__FILE__);
    $module['2000_Downloads']['120_File_manage_title'] = $file;
    return;
}
if (!defined('IP_ROOT_PATH')) {
    define('IP_ROOT_PATH', './../');
}
if (!defined('PHP_EXT')) {
    define('PHP_EXT', substr(strrchr(__FILE__, '.'), 1));
}
require 'pagestart.' . PHP_EXT;
include IP_ROOT_PATH . 'includes/pafiledb_common.' . PHP_EXT;
$custom_fields = new custom_fields();
$custom_fields->custom_table = PA_CUSTOM_TABLE;
$custom_fields->custom_data_table = PA_CUSTOM_DATA_TABLE;
$custom_fields->init();
$pafiledb->init();
$cat_id = request_var('cat_id', 0);
$file_id = request_var('file_id', 0);
$file_ids = request_var('file_ids', array(0));
$start = request_var('start', 0);
$start = $start < 0 ? 0 : $start;
$mode = request_var('mode', '');
$mode_js = request_var('mode_js', '');
$mode = isset($_POST['addfile']) ? 'add' : $mode;
$mode = isset($_POST['delete']) ? 'delete' : $mode;
$mode = isset($_POST['approve']) ? 'do_approve' : $mode;
$mode = isset($_POST['unapprove']) ? 'do_unapprove' : $mode;