Exemplo n.º 1
0
</td>
            <td><a href="javascript: void(0)" title="<?php 
                    echo $row->filename;
                    ?>
" data-rel="tooltip"><?php 
                    echo substr($row->filename, 0, 60);
                    ?>
...</a></td>
            <td><!--<img src="<?php 
                    echo base_url() . 'uploads/' . $row->doc_paths . '/' . $row->uploaded_filename;
                    ?>
" style="max-width:50px;" />--><?php 
                    echo icon($row->type);
                    ?>
 &nbsp;&nbsp; <?php 
                    echo get_dg($row->filesize);
                    ?>
</td>
            <td><?php 
                    echo date('M d, Y h:i A', strtotime($row->time));
                    ?>
</td>
            <td><label style="float:left;">
                <input type="checkbox" class="ace ace-switch ace-switch-3" id="privacy_<?php 
                    echo $row->id;
                    ?>
" onclick="set_privacy('<?php 
                    echo $row->id;
                    ?>
')" name="privacy" <?php 
                    if ($row->privacy == 1) {
Exemplo n.º 2
0
                            echo base_url() . 'uploads/' . $doc->doc_paths . '/' . $doc->uploaded_filename;
                            ?>
" style="max-width:50px; margin-top:3px;" />
                    <?php 
                        } else {
                            echo icon($doc->type);
                        }
                        ?>
                    <span class="grey">"<a href="javascript: void(0)" title="<?php 
                        echo $doc->filename;
                        ?>
" data-rel="tooltip"><?php 
                        echo substr($doc->filename, 0, 60);
                        ?>
...</a>"</span> <span class="red">"<?php 
                        echo get_dg($doc->filesize);
                        ?>
"</span> <span class="widget-toolbar no-border"><span class="grey"><i class="ace-icon fa fa-download"></i> <a class="blue" href="<?php 
                        echo base_url() . 'uploads/' . $doc->doc_paths . '/' . $doc->uploaded_filename;
                        ?>
" target="_blank">Download</a> | <i class="ace-icon fa fa-clock-o bigger-110"></i> <?php 
                        echo date("M d, Y h:i A", strtotime($doc->time));
                        ?>
                    <?php 
                        if ($user->user_rights == 1) {
                            ?>
                    | <a onclick="return confirm('Are you sure you wish to proceed?')" href="<?php 
                            echo site_url("documents/delete/" . $doc->id);
                            ?>
" class="red"> <i class="ace-icon fa fa-trash-o bigger-130"></i> </a>
                    <?php 
Exemplo n.º 3
0
function get_remaining_space()
{
    $CI =& get_instance();
    $userid = $CI->session->userdata("isLoggedIn")->id;
    $user = $CI->common_model->query("SELECT premium FROM users WHERE users.id = " . $userid . "")->row();
    $data = array();
    $check = $CI->common_model->query("SELECT SUM(filesize) AS total FROM documents WHERE user_id = " . $userid . "");
    if ($user->premium == 0) {
        $data["total"] = "2.0 GB";
        if ($check->num_rows() > 0) {
            $total = $check->row()->total;
            $sizeinbytes = 2147483648 - intval($total);
            $remaining = get_dg($sizeinbytes);
            $data["remaining"] = $remaining;
            $data["percentage"] = get_inper("2147483648", $total);
        } else {
            $data["remaining"] = "2.0 GB";
            $data["percentage"] = get_inper(2147483648, 2147483648);
        }
    } else {
        if ($user->premium == 1) {
            $total = $check->row()->total;
            $sizeinbytes = 5368709120 - intval($total);
            $remaining = get_dg($sizeinbytes);
            $data["remaining"] = $remaining;
            $data["percentage"] = get_inper(5368709120, $total);
            $data["total"] = "5.0 GB";
        }
    }
    return $data;
}