コード例 #1
0
ファイル: download-manager.php プロジェクト: yszar/linuxwp
$die = 0;
//Form Processing
if (isset($_POST['do'])) {
    // Decide What To Do
    switch (hacklogdm_admin::post('do')) {
        /*************************************************************************************************
         * action update
         **************************************************************************************************/
        case __('Edit File', hacklogdm::textdomain):
            $file_size_sql = '';
            $file_sql = '';
            $file_id = intval(hacklogdm_admin::post('file_id', 0));
            $file_type = intval(hacklogdm_admin::post('file_type', -1));
            //the variable to use
            $file_name = addslashes(trim(hacklogdm_admin::post('file_name')));
            $file_path = hacklogdm_admin::get_opt('download_path');
            switch ($file_type) {
                // edit orignal file
                case -1:
                    $file = hacklogdm_admin::post('old_file');
                    if (hacklogdm::is_remote_file($file)) {
                        $file_size = hacklogdm_admin::remote_filesize($file);
                        $file_hash = 'N/A';
                    } else {
                        $file_size = filesize($file_path . $file);
                        $file_hash = hacklogdm_admin::get_file_hash($file_path . $file);
                    }
                    break;
                    // use server file
                // use server file
                case 0:
コード例 #2
0
ファイル: download-uninstall.php プロジェクト: yszar/linuxwp
        ?>
</h2>
<p><?php 
        _e('Deactivating Hacklog-DownloadManager plugin does not remove any data that may have been created, such as the download options and the download data. To completely remove this plugin, you can uninstall it here.', hacklogdm::textdomain);
        ?>
</p>
<p style="color: red"><strong><?php 
        _e('NOTE:', hacklogdm::textdomain);
        ?>
</strong><br />
		<?php 
        _e('The download files uploaded by Hacklog-DownloadManager <strong>WILL NOT</strong> be deleted. You will have to delete it manually.', hacklogdm::textdomain);
        ?>
<br />
		<?php 
        printf(__('The path to the downloads folder is <strong>\'%s\'</strong>.', hacklogdm::textdomain), hacklogdm_admin::get_opt('download_path'));
        ?>
</p>
<p style="color: red"><strong><?php 
        _e('WARNING:', 'hacklog-downloadmanager');
        ?>
</strong><br />
		<?php 
        _e('Once uninstalled, this cannot be undone. You should use a Database Backup plugin of WordPress to back up all the data first.', hacklogdm::textdomain);
        ?>
</p>
<p style="color: red"><strong><?php 
        _e('The following WordPress Options/Tables will be DELETED:', hacklogdm::textdomain);
        ?>
</strong><br />
</p>
コード例 #3
0
ファイル: jqueryFileTree.php プロジェクト: yszar/linuxwp
} else {
    if (file_exists('../../../../wp-load.php')) {
        require_once "../../../../wp-load.php";
    } else {
        die('<p>Failed to load bootstrap.</p>');
    }
}
require dirname(__FILE__) . '/../../includes/hacklogdm_admin.class.php';
//Check Whether User Can Manage Downloads
if (!current_user_can('manage_downloads')) {
    wp_die('Access Denied');
}
//init the variables for safe reasons.
$root = '';
$dir = '';
$root = hacklogdm_admin::get_opt('download_path');
$dir = urldecode(hacklogdm_admin::post('dir'));
if (file_exists($root . $dir)) {
    $files = scandir($root . $dir);
    natcasesort($files);
    if (count($files) > 2) {
        /* The 2 accounts for . and .. */
        echo "<ul class=\"jqueryFileTree\" style=\"display: none;\">";
        // All dirs
        foreach ($files as $file) {
            if (hacklogdm_admin::is_normal_file($root . $dir, $file) && is_dir($root . $dir . $file)) {
                echo "<li class=\"directory collapsed\"><a href=\"#\" rel=\"" . htmlspecialchars($dir . $file) . "/\">" . htmlspecialchars($file) . "</a></li>";
            }
        }
        // All files
        foreach ($files as $file) {
コード例 #4
0
ファイル: download-options.php プロジェクト: yszar/linuxwp
?>
"
						   size="50" dir="ltr" /><br />
						   <?php 
_e('The absolute path to the directory where all the files are stored (without trailing slash).', hacklogdm::textdomain);
?>
</td>
			</tr>
			<tr valign="top">
				<th><?php 
_e('Download Path URL:', hacklogdm::textdomain);
?>
</th>
				<td><input type="text" name="download_path_url"
						   value="<?php 
echo stripslashes(hacklogdm_admin::get_opt('download_path_url'));
?>
"
						   size="50" dir="ltr" /><br />
<?php 
_e('The url to the directory where all the files are stored (without trailing slash).', hacklogdm::textdomain);
?>
</td>
			</tr>

			<tr valign="top">
				<th><?php 
_e('Use File Name Or File ID In Download URL?', hacklogdm::textdomain);
?>
</th>
				<td><input type="radio" id="download_options_use_filename-0"