Beispiel #1
0
        echo shorten_string($_file->fileName);
        if ($user->userCanDownload == '1') {
            ?>
</a><?php 
        }
        if (!empty($_file->fileMD5)) {
            ?>
<br /><span class="md5">MD5: <?php 
            echo $_file->fileMD5;
            ?>
</span><?php 
        }
        ?>
</td>
			<td><?php 
        echo roundsize($_file->fileSize);
        ?>
</td>
			<td><center><?php 
        echo cvTZ($_file->fileTime, $user->timeZone, $user->timeFormat);
        ?>
</center></td>
		    </tr>
		    <?php 
        $_count++;
        ?>
		    <?php 
    }
    ?>
		</tbody>
	    </table>
Beispiel #2
0
echo set_checkbox('inputCanDownload', '1', $details->userCanDownload == '1' ? true : false);
?>
 /> 
	    </div>
	</div>	
	<div class="control-group hidden useUser">
	    <label class="control-label" for="inputMaxSize"><?php 
echo __('user_lbl_maxsize');
?>
</label>
	    <div class="controls">
		<input type="text" id="inputMaxSize" name="inputMaxSize" value="<?php 
echo set_value('inputMaxSize', $details->userMaxFileSize);
?>
" class="span1" /> in Bytes ( <strong>php.ini:</strong> <?php 
echo roundsize(convertBytes(ini_get('upload_max_filesize')));
?>
 )
	    </div>
	</div>	
	<div class="control-group hidden useUser">
	    <label class="control-label" for="inputMaxFiles"><?php 
echo __('user_lbl_maxfiles');
?>
</label>
	    <div class="controls">
		<input type="text" id="inputMaxFiles" name="inputMaxFiles" value="<?php 
echo set_value('inputMaxFiles', $details->userMaxNumFiles);
?>
" class="span1" />
	    </div>
Beispiel #3
0
 public function sendbyemail()
 {
     $this->load->library('email');
     $this->load->helper('email');
     $_return = array();
     $_header = '401';
     if ($this->input->is_ajax_request()) {
         $_all_get = $this->input->get(NULL, TRUE);
         if (isset($_all_get['inputEmail']) && isset($_all_get['inputMessage']) && !empty($_all_get['inputEmail']) && valid_email($_all_get['inputEmail']) && !empty($_all_get['inputMessage']) && count($_all_get['mFile']) != 0) {
             $_senderror = false;
             $emailset = emailconfig();
             $this->email->initialize($emailset);
             $this->email->clear(TRUE);
             $_directDownload = isset($_all_get['inputDirectDownload']) && $_all_get['inputDirectDownload'] == 'yes' ? true : false;
             $_emailBody = $this->mGlobal->getConfig('SEND_FILES_EMAIL')->configVal;
             $_emailSubject = $this->mGlobal->getConfig('SEND_FILES_SUBJECT')->configVal;
             $_productName = $this->mGlobal->getConfig('PRODUCT_NAME')->configVal;
             $_listText = '';
             if ($_directDownload) {
                 require APPPATH . 'libraries/uuid.php';
                 $_uuid = UUID::generate();
                 $_pubid = uniqid('pub_', true);
                 $_insertPublic = array('id' => NULL, 'publicUniqueID' => $_pubid, 'publicUUID' => $_uuid, 'publicMessage' => NULL, 'userUniqueID' => $this->session->userdata['userUnique'], 'publicPassword' => NULL, 'publicLimit' => NULL, 'published' => '1');
                 $_insertedPublic = $this->mFiles->createPublic($_insertPublic);
                 if (!$_insertedPublic) {
                     $_directDownload = false;
                 }
             }
             for ($i = 0; $i < count($_all_get['mFile']); $i++) {
                 $_fileDetails = $this->mFiles->getFiles($_all_get['mFile'][$i]);
                 $_listText .= "<br />- " . $_fileDetails->fileName . ' ( ' . roundsize($_fileDetails->fileSize) . ' )';
                 if ($_directDownload) {
                     $_f2p_insert = array('id' => NULL, 'publicUniqueID' => $_pubid, 'fileUniqueID' => $_fileDetails->fileUniqueID, 'allowedCount' => NULL, 'downloadCount' => NULL);
                     $_file2public = $this->mFiles->createPublic($_f2p_insert, 'public2file');
                     if ($_file2public) {
                         $_listText .= "<br />" . site_url('public/download/' . $_uuid . '/' . $_fileDetails->fileUniqueID);
                     }
                 } else {
                     if (file_exists(FCPATH . 'data' . DS . 'files' . DS . $_fileDetails->fileNewName)) {
                         $this->email->attach(FCPATH . 'data' . DS . 'files' . DS . $_fileDetails->fileNewName, 'attachment', $_fileDetails->fileName);
                     }
                 }
             }
             $_emailBody = str_replace('{email}', $_all_get['inputEmail'], $_emailBody);
             $_emailBody = str_replace('{sender}', $this->session->userdata['companyName'], $_emailBody);
             $_emailBody = str_replace('{filelist}', $_listText, $_emailBody);
             $_emailBody = str_replace('{message}', $_all_get['inputMessage'], $_emailBody);
             $_emailBody = str_replace('{product}', $_productName, $_emailBody);
             $_emailSubject = str_replace('{sender}', $this->session->userdata['companyName'], $_emailSubject);
             $_emailSubject = str_replace('{recipient}', $_all_get['inputEmail'], $_emailSubject);
             $_emailSubject = str_replace('{product}', $_productName, $_emailSubject);
             $this->email->to($_all_get['inputEmail']);
             $this->email->from($this->session->userdata['emailAddress'], $this->session->userdata['companyName']);
             $this->email->subject($_emailSubject);
             $this->email->message($_emailBody);
             $this->email->set_alt_message(strip_tags($_emailBody));
             if ($this->email->send()) {
                 for ($i = 0; $i < count($_all_get['mFile']); $i++) {
                     $_fileDetails = $this->mFiles->getFiles($_all_get['mFile'][$i]);
                     $this->mGlobal->log(array('type' => "info", 'message' => "User '{$this->session->userdata['companyName']}' sent file '{$_fileDetails->fileName}' to '{$_all_get['inputEmail']}'.", 'data' => $_all_get['mFile'][$i], 'size' => $_fileDetails->fileSize));
                 }
                 $_return = array('type' => 'success', 'message' => __('files_msg_emailsendsuccess'));
             } else {
                 $_return = array('type' => 'error', 'message' => __('files_msg_emailsenderror'));
             }
         } else {
             $_return = array('type' => 'error', 'message' => __('files_msg_transmitproblem'));
         }
     } else {
         $_return = array('type' => 'error', 'message' => __('files_msg_noajaxrequest'));
     }
     $this->output->set_content_type('application/json')->set_output(json_encode($_return));
 }
Beispiel #4
0
            $_style = ' progress-success';
        }
    }
    ?>

		<div class="progress<?php 
    echo $_style;
    ?>
">
		    <div class="bar" style="width: <?php 
    echo sprintf('%01.2f', $_full);
    ?>
%;"></div>
		</div>		
		<div class="tac"><?php 
    echo __('request_txt_freespace', array(roundsize($disktotal - $diskfree), roundsize($disktotal), roundsize($diskfree)));
    ?>
</div>
	    </div>
	</div>
	<?php 
}
?>
	
    </div>
    <?php 
if ($errortype != false) {
    ?>
    <br />
    <div class="alert alert-<?php 
    echo $errortype;
Beispiel #5
0
?>
"><?php 
echo $details->fileName;
?>
</a></p>
		    </div>
		</div>

		<div class="control-group">
		    <label class="control-label"><?php 
echo __('files_lbl_size');
?>
</label>
		    <div class="controls">
			<p><?php 
echo roundsize($details->fileSize);
?>
</p>
		    </div>
		</div>
				
		<?php 
if (!empty($details->fileMD5)) {
    ?>
		<div class="control-group">
		    <label class="control-label"><?php 
    echo __('files_lbl_md5');
    ?>
</label>
		    <div class="controls">
			<p><?php 
 array_multisort($files, SORT_ASC, SORT_REGULAR);
 foreach ($files as $v) {
     if ($v) {
         $extension = substr(strrchr($v, "."), 1);
         $file_image = "ico_file.png";
         if ($extension == 'php' || $extension == 'php3') {
             $file_image = "ico_php.png";
         }
         if ($extension == 'htm' || $extension == 'HTM' || $extension == 'html' || $extension == 'HTML') {
             $file_image = "ico_html.png";
         }
         if ($extension == 'jpg' || $extension == 'JPG' || $extension == 'jpeg' || $extension == 'JPEG' || $extension == 'gif' || $extension == 'GIF' || $extension == 'png' || $extension == 'PNG') {
             $file_image = "ico_picture.png";
         }
         $last_updated_time = date("Y.m.d H:i:s", filemtime($current_folder . $v));
         $file_size = roundsize(filesize($current_folder . $v));
         if ($extension == 'txt' || $extension == 'inc' || $extension == 'sh' || $extension == 'js' || $extension == 'xml' || $extension == 'conf' || $extension == 'config' || $extension == 'ini' || $extension == 'php' || $extension == 'php3' || $extension == 'htm' || $extension == 'HTM' || $extension == 'html' || $extension == 'HTML' || $extension == 'css' || $extension == 'CSS') {
             $edit_file_content = "<a href=\"file_manager.php?p=" . urlencode($current_folder) . "&amp;f=" . urlencode($v) . "&amp;do=edit#file_edit\"><img width=\"16\" height=\"16\" src=\"rbfmimg/ico_script_edit.png\" alt=\"Edit\" title=\"View/Edit\" border=\"0\" /></a>";
         } else {
             $edit_file_content = "&nbsp;";
         }
         $fileperms = GetFilePerms($current_folder . $v);
         if ($url_path) {
             $browser = "<a href=\"{$url_path}{$v}\" target=\"_blank\"><img src=\"rbfmimg/ico_open_as_web.png\" border=\"0\" width=\"16\" height=\"16\" alt=\"W\" title=\"Open as web page\" /></a>";
             if ($url_field) {
                 $use_url = "<img src=\"rbfmimg/ico_use_file.png\" border=\"0\" width=\"16\" height=\"16\" alt=\"U\" title=\"Use URL ({$url_path}{$v})\" onclick=\"window.opener.document.getElementById('{$url_field}').value='{$url_path}{$v}'; window.close()\" style=\"cursor: pointer\" />";
             } else {
                 $use_url = "<img src=\"rbfmimg/ico_use_file_inactive.png\" border=\"0\" width=\"16\" height=\"16\" alt=\"U\" title=\"Use URL (Inactive!!!)\" />";
             }
         } else {
             $browser = "&nbsp;";
Beispiel #7
0
    echo __('import_lsttit_size');
    ?>
</th>
			    </tr>
			</thead>
			<tbody>
			    <?php 
    for ($i = 0; $i < count($files); $i++) {
        ?>
			    <tr >
				<td><?php 
        echo $files[$i];
        ?>
</td>
				<td><?php 
        echo roundsize(filesize(FCPATH . 'data' . DS . 'import' . DS . $files[$i]));
        ?>
</td>
			    </tr>
			    <?php 
    }
    ?>
			</tbody>
		    </table>		    
		</fieldset>
	    </form>
	<?php 
} else {
    ?>
	    <div class="alert alert-info">
		<?php 
Beispiel #8
0
 private function _sendFileEmail($_list = array())
 {
     $this->load->model(array('user/mUser', 'mGlobal'));
     if (is_array($_list) && count($_list) != 0) {
         $_user = $this->session->userdata['userReceiveNot'];
         $_details = $this->mUser->getUser($_user);
         $_sender = $this->mUser->getUser($this->session->userdata['userid']);
         if ($_details != false && $_sender != false) {
             $this->load->library('email');
             $this->load->helper('myemail');
             $emailsend = emailconfig();
             $this->email->initialize($emailsend);
             $_emailBody = $this->mGlobal->getConfig('SEND_FILES_CUST')->configVal;
             $_emailSubject = $this->mGlobal->getConfig('SEND_FILES_CSUBJECT')->configVal;
             $_productName = $this->mGlobal->getConfig('PRODUCT_NAME')->configVal;
             $_listText = '';
             for ($i = 0; $i < count($_list); $i++) {
                 $_data = explode('|', $_list[$i]);
                 $_listText .= "\n- " . $_data[0] . ' ( ' . roundsize($_data[1]) . ' )';
             }
             $_emailBody = str_replace('{adminurl}', site_url('admin/account/login'), $_emailBody);
             $_emailBody = str_replace('{sender}', $_sender->companyName, $_emailBody);
             $_emailBody = str_replace('{filelist}', $_listText, $_emailBody);
             $_emailBody = str_replace('{product}', $_productName, $_emailBody);
             $_emailSubject = str_replace('{recipient}', $_details->companyName, $_emailSubject);
             $_emailSubject = str_replace('{sender}', $_sender->companyName, $_emailSubject);
             $_emailSubject = str_replace('{product}', $_productName, $_emailSubject);
             $this->email->clear(TRUE);
             $this->email->to($_details->emailAddress);
             $this->email->from($_sender->emailAddress, $_sender->companyName);
             $this->email->subject($_emailSubject);
             $this->email->message($_emailBody);
             $this->email->set_alt_message(strip_tags($_emailBody));
             if ($this->email->send()) {
                 return true;
             }
             return false;
         }
     }
     return false;
 }
Beispiel #9
0
echo base_url();
?>
assets/styles/jquery.fileupload-ui.css">
<!-- Shim to make HTML5 elements usable in older Internet Explorer versions -->
<!--[if lt IE 9]><script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script><![endif]-->

<div class="container">
    <div class="page-header">
        <h3><?php 
echo __('up_head_fileupload');
?>
</h3>
    </div>
    <blockquote>
        <p><?php 
echo __('up_desc_fileupload', array(roundsize(convertBytes(ini_get('upload_max_filesize')))));
?>
</p>
    </blockquote>
    <br>
    <form id="fileupload" action="<?php 
echo site_url('admin/uploads/upload');
?>
" method="POST" enctype="multipart/form-data">
        <div class="row fileupload-buttonbar">
            <div class="span7">
                <span class="dsbl btn fileinput-button">
                    <i class="icon-plus"></i>
                    <span><?php 
echo __('up_btn_selectfile');
?>
Beispiel #10
0
        echo cvTZ($entry->logTime);
        ?>
</td>
                                <td><span class="label label-<?php 
        echo $typeClass;
        ?>
"><?php 
        echo strtoupper($entry->logType);
        ?>
</span> <?php 
        echo $entry->logMessage;
        ?>
</td>
				<td><?php 
        if ($entry->logSize != NULL) {
            echo roundsize($entry->logSize);
        } else {
            echo __('log_msg_na');
        }
        ?>
</td>
			    </tr>
			    <?php 
    }
    ?>
			</tbody>
		    </table>
		    
		    <div class="markcontrols" style="margin-top:30px;">
			<div class="control-group">
			    <label class="control-label" for="doAction" style="text-align:left;width:65px;"><?php