当前位置: 首页>>代码示例>>PHP>>正文


PHP cs_filesize函数代码示例

本文整理汇总了PHP中cs_filesize函数的典型用法代码示例。如果您正苦于以下问题:PHP cs_filesize函数的具体用法?PHP cs_filesize怎么用?PHP cs_filesize使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了cs_filesize函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: strlen

}
require_once 'mods/clansphere/filetype.php';
for ($run = 0; $run < $count_att; $run++) {
    $file = $cs_att[$run]['boardfiles_name'];
    $extension = strlen(strrchr($file, "."));
    $name = strlen($file);
    $ext = substr($file, $name - $extension + 1, $name);
    $ext_lower = strtolower($ext);
    $data['attachments'][$run]['icon'] = cs_filetype($ext_lower);
    if (file_exists('uploads/board/files/' . $cs_att[$run]['boardfiles_id'] . '.' . $ext)) {
        $file_file = filesize('uploads/board/files/' . $cs_att[$run]['boardfiles_id'] . '.' . $ext);
        $data['attachments'][$run]['filename'] = cs_html_link($cs_main['php_self']['dirname'] . 'mods/board/attachment.php?id=' . $cs_att[$run]['boardfiles_id'], $file, 1);
        $data['attachments'][$run]['size'] = cs_filesize($file_file);
    } elseif (file_exists('uploads/board/files/' . $file)) {
        $file_file = filesize('uploads/board/files/' . $file);
        $data['attachments'][$run]['filename'] = cs_html_link($cs_main['php_self']['dirname'] . 'mods/board/attachment.php?name=' . $file, $file, 1);
        $data['attachments'][$run]['size'] = cs_filesize($file_file);
    } else {
        $data['attachments'][$run]['filename'] = $cs_lang['no_att_exist'];
        $data['attachments'][$run]['size'] = cs_filesize(0);
    }
    $threads_headline = $cs_att[$run]['threads_headline'];
    $data['attachments'][$run]['topics'] = strlen($threads_headline) <= 15 ? $threads_headline : cs_substr($threads_headline, 0, 15) . '...';
    $data['attachments'][$run]['threads_headline'] = $threads_headline;
    $data['attachments'][$run]['topics_link'] = cs_url('board', 'thread', 'where=' . $cs_att[$run]['threads_id']);
    $data['attachments'][$run]['downloaded'] = $cs_att[$run]['boardfiles_downloaded'];
    $data['attachments'][$run]['user'] = $cs_att[$run]['users_nick'];
    $data['attachments'][$run]['user_link'] = cs_url('users', 'view', 'id=' . $cs_att[$run]['users_id']);
    $data['attachments'][$run]['remove'] = cs_url('board', 'delatt_admin', 'id=' . $cs_att[$run]['boardfiles_id']);
}
echo cs_subtemplate(__FILE__, $data, 'board', 'attachements_admin');
开发者ID:aberrios,项目名称:WEBTHESGO,代码行数:31,代码来源:attachments_admin.php

示例2: cs_sql_select

    $el_id = 'game_1';
    $cs_games = cs_sql_select(__FILE__, 'games', 'games_name,games_id', 0, 'games_name', 0, 0);
    $games_count = count($cs_games);
    for ($run = 0; $run < $games_count; $run++) {
        $sel = $cs_games[$run]['games_id'] == $cs_replays['games_id'] ? 1 : 0;
        $data['games'][$run]['op'] = cs_html_option($cs_games[$run]['games_name'], $cs_games[$run]['games_id'], $sel);
    }
    $url = 'uploads/games/' . $cs_replays['games_id'] . '.gif';
    $data['replays']['games_img'] = cs_html_img($url, 0, 0, 'id="' . $el_id . '"');
    $data['replays']['date_sel'] = cs_dateselect('date', 'date', $cs_replays['replays_date'], 1995);
    $matches[1] = $cs_lang['rep_infos'];
    $return_types = '';
    foreach ($rep_filetypes as $add) {
        $return_types .= empty($return_types) ? $add : ', ' . $add;
    }
    $matches[2] = $cs_lang['max_size'] . cs_filesize($rep_max['size']) . cs_html_br(1);
    $matches[2] .= $cs_lang['filetypes'] . $return_types;
    $data['replays']['upload_clip'] = cs_abcode_clip($matches);
    $data['replays']['abcode_smileys'] = cs_abcode_smileys('replays_info');
    $data['replays']['abcode_features'] = cs_abcode_features('replays_info');
    $data['replays']['close_check'] = empty($cs_replays['replays_close']) ? '' : 'checked="checked"';
    echo cs_subtemplate(__FILE__, $data, 'replays', 'create');
} else {
    $cs_replays['users_id'] = $account['users_id'];
    $cs_replays['replays_since'] = cs_time();
    $replays_cells = array_keys($cs_replays);
    $replays_save = array_values($cs_replays);
    cs_sql_insert(__FILE__, 'replays', $replays_cells, $replays_save);
    if (!empty($files_gl['replay']['tmp_name'])) {
        $where = "replays_team1 = '" . cs_sql_escape($cs_replays['replays_team1']) . "'";
        $order = 'replays_since DESC';
开发者ID:aberrios,项目名称:WEBTHESGO,代码行数:31,代码来源:create.php

示例3: getimagesize

    $data['abcode']['pattern'] = $cs_abcode['abcode_pattern'];
    $data['abcode']['result'] = $cs_abcode['abcode_result'];
    if (empty($cs_abcode['abcode_file'])) {
        $data['abcode']['pic'] = $cs_lang['nopic'];
    } else {
        $place = 'uploads/abcode/' . $cs_abcode['abcode_file'];
        $size = getimagesize($cs_main['def_path'] . '/' . $place);
        $data['abcode']['pic'] = cs_html_img($place, $size[1], $size[0]);
    }
    $matches[1] = $cs_lang['pic_infos'];
    $return_types = '';
    foreach ($img_filetypes as $add) {
        $return_types .= empty($return_types) ? $add : ', ' . $add;
    }
    $matches[2] = $cs_lang['max_width'] . $op_abcode['max_width'] . ' px' . cs_html_br(1);
    $matches[2] .= $cs_lang['max_height'] . $op_abcode['max_height'] . ' px' . cs_html_br(1);
    $matches[2] .= $cs_lang['max_size'] . cs_filesize($op_abcode['max_size']) . cs_html_br(1);
    $matches[2] .= $cs_lang['filetypes'] . $return_types;
    $data['abcode']['clip'] = cs_abcode_clip($matches);
    $data['abcode']['file'] = $cs_abcode['abcode_file'];
    $data['abcode']['order'] = $cs_abcode['abcode_order'];
    $data['abcode']['id'] = $abcode_id;
    echo cs_subtemplate(__FILE__, $data, 'abcode', 'edit');
} else {
    $abcode_cells = array_keys($cs_abcode);
    $abcode_save = array_values($cs_abcode);
    cs_sql_update(__FILE__, 'abcode', $abcode_cells, $abcode_save, $abcode_id);
    cs_cache_delete('abcode_smileys');
    cs_cache_delete('abcode_content');
    cs_redirect($cs_lang['changes_done'], 'abcode');
}
开发者ID:aberrios,项目名称:WEBTHESGO,代码行数:31,代码来源:edit.php

示例4: foreach

     $run = 0;
     $count = 0;
     foreach ($diff as $pic) {
         $count++;
         $data['pictures'][$run]['run'] = $count;
         $data['pictures'][$run]['name'] = $pic;
         $img_size = getimagesize("uploads/gallery/pics/{$pic}");
         $img_filesize = filesize("uploads/gallery/pics/{$pic}");
         $img_width = $img_size[0];
         $img_height = $img_size[1];
         $img_w_h = $img_width / $img_height;
         $img_new_height = 40;
         $img_new_width = $img_new_height * $img_w_h;
         $data['pictures'][$run]['img'] = cs_html_img('mods/gallery/image.php?picname=' . $pic);
         $data['pictures'][$run]['size'] = $img_width . 'x' . $img_height;
         $data['pictures'][$run]['filesize'] = cs_filesize($img_filesize);
         $run++;
     }
 } elseif (empty($checkDiff) and !empty($_POST['read']) or empty($checkDiff) and $zip_file == 1) {
     $data['if']['nopic'] = TRUE;
 }
 if (!empty($checkDiff2) and !empty($_POST['del'])) {
     $data['if']['thumb'] = TRUE;
     $run = 0;
     foreach ($diff2 as $thumb) {
         if (cs_unlink('gallery', 'Thumb_' . $thumb, 'thumbs') == true) {
             $where = "gallery_name = '" . $thumb . "'";
             $search = cs_sql_count(__FILE__, 'gallery', $where);
             if (!empty($search)) {
                 $query = "DELETE FROM {pre}_gallery WHERE gallery_name='{$thumb}'";
                 cs_sql_query(__FILE__, $query);
开发者ID:aberrios,项目名称:WEBTHESGO,代码行数:31,代码来源:manage_advanced.php

示例5: cs_sql_count

$count_votes = cs_sql_count(__FILE__, $from, $where);
$data['data']['count_votes'] = $count_votes;
$gallery = cs_sql_select(__FILE__, 'usersgallery', '*', 'users_id=' . $id, 'usersgallery_id DESC', 0, 0);
$loop = count($gallery);
$ges_size = 0;
$ges_traffic = 0;
for ($run = 0; $run < $loop; $run++) {
    $file = 'uploads/usersgallery/pics/' . $gallery[$run]['usersgallery_name'];
    $count = $gallery[$run]['usersgallery_count'];
    $size = filesize($file);
    $traffic = $size * $count;
    $ges_traffic += $traffic;
    $ges_size += $size;
}
$data['data']['count_size'] = cs_filesize($ges_size, 2);
$data['data']['count_trafik'] = cs_filesize($ges_traffic, 2);
$options = cs_sql_option(__FILE__, 'usersgallery');
$space = 0;
if (!empty($count_pics) and !empty($options['max_files'])) {
    $space = $count_pics / $options['max_files'] * 100;
    $space = round($space, 1);
}
$data['data']['count_space'] = $space;
if ($space <= 50) {
    $data['img']['01'] = 'symbols/messages/messages01.png';
} elseif ($space > 50 and $space < 95) {
    $data['img']['01'] = 'symbols/messages/messages01_orange.png';
} else {
    $data['img']['01'] = 'symbols/messages/messages01_red.png';
}
if (!empty($space)) {
开发者ID:aberrios,项目名称:WEBTHESGO,代码行数:31,代码来源:center_info.php

示例6: while

    $sel = 0;
    while ($levels < 6) {
        $cs_categories['categories_access'] == $levels ? $sel = 1 : ($sel = 0);
        $data['access'][$levels]['sel'] = cs_html_option($levels . ' - ' . $cs_lang['lev_' . $levels], $levels, $sel);
        $levels++;
    }
    $data['cat']['abcode_smileys'] = cs_abcode_smileys('categories_text');
    $data['cat']['abcode_features'] = cs_abcode_features('categories_text');
    $matches[1] = $cs_lang['pic_infos'];
    $return_types = '';
    foreach ($img_filetypes as $add) {
        $return_types .= empty($return_types) ? $add : ', ' . $add;
    }
    $matches[2] = $cs_lang['max_width'] . $op_categories['max_width'] . ' px' . cs_html_br(1);
    $matches[2] .= $cs_lang['max_height'] . $op_categories['max_height'] . ' px' . cs_html_br(1);
    $matches[2] .= $cs_lang['max_size'] . cs_filesize($op_categories['max_size']) . cs_html_br(1);
    $matches[2] .= $cs_lang['filetypes'] . $return_types;
    $data['cat']['picup_clip'] = cs_abcode_clip($matches);
    echo cs_subtemplate(__FILE__, $data, 'categories', 'create');
} else {
    $categories_cells = array_keys($cs_categories);
    $categories_save = array_values($cs_categories);
    cs_sql_insert(__FILE__, 'categories', $categories_cells, $categories_save);
    if (!empty($files_gl['picture']['tmp_name'])) {
        $where = "categories_name = '" . cs_sql_escape($cs_categories['categories_name']) . "'";
        $getid = cs_sql_select(__FILE__, 'categories', 'categories_id', $where);
        $filename = 'picture-' . $getid['categories_id'] . '.' . $extension;
        cs_upload('categories', $filename, $files_gl['picture']['tmp_name']);
        $cs_categories2['categories_picture'] = $filename;
        $categories2_cells = array_keys($cs_categories2);
        $categories2_save = array_values($cs_categories2);
开发者ID:aberrios,项目名称:WEBTHESGO,代码行数:31,代码来源:create.php

示例7: isset

 $data['if']['file'] = TRUE;
 require_once 'mods/clansphere/filetype.php';
 for ($run = 0; $run < $run_loop_files; $run++) {
     $num = $run + 1;
     $cs_files["text_{$num}"] = isset($_POST["text_{$num}"]) ? $_POST["text_{$num}"] : '';
     $data['files'][$run]['num'] = $num;
     $data['files'][$run]['if']['empty_file'] = FALSE;
     $data['files'][$run]['if']['file_exists'] = FALSE;
     if (empty($file_name[$num])) {
         $data['files'][$run]['if']['empty_file'] = TRUE;
         $matches[1] = $cs_lang['infos'];
         $return_types = '';
         foreach ($filetypes as $add) {
             $return_types .= empty($return_types) ? $add : ', ' . $add;
         }
         $matches[2] = $cs_lang['max_size'] . cs_filesize($max_size) . cs_html_br(1);
         $matches[2] .= $cs_lang['filetypes'] . ': ' . $return_types;
         $data['files'][$run]['clip'] = cs_abcode_clip($matches);
     } else {
         $data['files'][$run]['if']['file_exists'] = TRUE;
         $data['files'][$run]['name'] = $file_name[$num];
         $data['files'][$run]['up_name'] = $file_upload_name[$num];
         $file = $file_name[$num];
         $extension = strlen(strrchr($file, "."));
         $name = strlen($file);
         $ext = substr($file, $name - $extension + 1, $name);
         $ext_lower = strtolower($ext);
         $data['files'][$run]['ext'] = cs_filetype($ext_lower);
         $data['files'][$run]['if']['file_is_picture'] = FALSE;
         $data['files'][$run]['if']['file_is_other'] = FALSE;
         #check if file is picture
开发者ID:aberrios,项目名称:WEBTHESGO,代码行数:31,代码来源:thread_add.php

示例8: cs_translate

<?php

// ClanSphere 2010 - www.clansphere.net
// $Id$
$cs_lang = cs_translate('explorer');
include_once 'mods/explorer/functions.php';
$dir = cs_explorer_path($_GET['file'], 'raw');
$lsd = cs_explorer_path($dir, 'escape');
$red_lsd = cs_explorer_path($dir, 'escape', 1);
if (empty($_GET['file'])) {
    cs_redirect($cs_lang['no_object'], 'explorer', 'roots', 'dir=' . $red_lsd);
}
if (!($info = stat($dir))) {
    cs_redirect($cs_lang['not_opened'], 'explorer', 'roots', 'dir=' . $red_lsd);
}
$data = array();
$data['var']['dir'] = $red_lsd;
$data['file']['name'] = $dir;
$data['file']['size'] = cs_filesize($info[7]);
$data['file']['chmod'] = substr(sprintf('%o', fileperms($dir)), -4);
$data['file']['lastchange_date'] = date('d.m.Y', $info[10]);
$data['file']['lastchange_time'] = date('G:i', $info[10]);
$data['file']['lastaccess_date'] = date('d.m.Y', $info[8]);
$data['file']['lastaccess_time'] = date('G:i', $info[8]);
$data['file']['owner'] = fileowner($dir);
$data['file']['ownergroup'] = filegroup($dir);
echo cs_subtemplate(__FILE__, $data, 'explorer', 'information');
开发者ID:aberrios,项目名称:WEBTHESGO,代码行数:27,代码来源:information.php

示例9: cs_html_link

         $data['data']['picture'] = cs_html_link('mods/gallery/image.php?pic=' . $cs_gallery['gallery_id'], $cs_lap, 0, 0, 0, 'rel="lightbox"');
     } else {
         $host = $cs_main['php_self']['website'];
         $host .= $cs_main['php_self']['dirname'];
         $host .= 'mods/gallery/image.php?pic=' . $cs_gallery['gallery_id'];
         $data['data']['picture'] = cs_html_link($host, $cs_lap, 0, 0, 0, 'rel="lightbox"');
     }
 }
 $data['data']['titel'] = $cs_gallery['gallery_titel'];
 $data['data']['date'] = cs_date('unix', $cs_gallery['gallery_time'], 1);
 $users_nick = cs_sql_select(__FILE__, 'users', 'users_nick', 'users_id = ' . $cs_gallery['users_id']);
 $data['data']['user'] = cs_secure($users_nick['users_nick']);
 $data['data']['description'] = cs_secure($cs_gallery['gallery_description'], 1, 1);
 $data['data']['pic_size'] = $img_size[0] . 'x' . $img_size[1] . ' Pixel';
 $size = filesize('uploads/gallery/pics/' . $cs_gallery['gallery_name']);
 $data['data']['filesize'] = cs_filesize($size);
 $data['data']['count'] = $cs_gallery['gallery_count'] + 1;
 $more = 'folders_id=' . $cs_gallery['folders_id'] . '&amp;where=';
 $puac = "gallery_status = 1 AND gallery_access <= '" . $account['access_gallery'] . "' AND folders_id = '" . $cs_gallery['folders_id'];
 $cond = "' AND gallery_id < '" . $cs_gallery['gallery_id'] . "'";
 $before = cs_sql_select(__FILE__, 'gallery', 'gallery_id', $puac . $cond, 'gallery_id DESC');
 $data['link']['picture_backward'] = empty($before) ? '' : cs_link(cs_icon('back', 22), 'gallery', 'com_view', $more . $before['gallery_id']);
 $cond = "' AND gallery_id > '" . $cs_gallery['gallery_id'] . "'";
 $next = cs_sql_select(__FILE__, 'gallery', 'gallery_id', $puac . $cond, 'gallery_id ASC');
 $data['link']['picture_forward'] = empty($next) ? '' : cs_link(cs_icon('forward', 22), 'gallery', 'com_view', $more . $next['gallery_id']);
 echo cs_subtemplate(__FILE__, $data, 'gallery', 'com_view');
 $where3 = "comments_mod = 'gallery' AND comments_fid = '" . $id . "'";
 $count_com = cs_sql_count(__FILE__, 'comments', $where3);
 include_once 'mods/comments/functions.php';
 $data['comments']['view'] = '';
 $data['comments']['create'] = '';
开发者ID:aberrios,项目名称:WEBTHESGO,代码行数:31,代码来源:com_view.php

示例10: empty

$perc_temp = 0;
$perc_all = 0;
if (!empty($space_total)) {
    $perc_used = empty($space_used) ? 0 : round($space_used * 100 / $space_total);
    $perc_free = empty($space_free) ? 0 : round($space_free * 100 / $space_total);
    $perc_mods = empty($space_mods) ? 0 : round($space_mods * 100 / $space_total);
    $perc_up = empty($space_up) ? 0 : round($space_up * 100 / $space_total);
    $perc_sym = empty($space_sym) ? 0 : round($space_sym * 100 / $space_total);
    $perc_temp = empty($space_temp) ? 0 : round($space_temp * 100 / $space_total);
    $perc_all = $perc_used + $perc_free;
}
if (!empty($cs_err) && $cs_err[1] != '') {
    $data['lang']['body'] = cs_abcode_clip($cs_err);
} else {
    $data['lang']['body'] = $cs_lang['body_storage'];
}
$data['storage']['space_total'] = cs_filesize($space_total);
$data['storage']['space_total_percent'] = $perc_all . ' %';
$data['storage']['space_free'] = cs_filesize($space_free);
$data['storage']['space_free_percent'] = $perc_free . ' %';
$data['storage']['space_used'] = cs_filesize($space_used);
$data['storage']['space_used_percent'] = $perc_used . ' %';
$data['storage']['space_mods'] = cs_filesize($space_mods);
$data['storage']['space_mods_percent'] = $perc_mods . ' %';
$data['storage']['space_sym'] = cs_filesize($space_sym);
$data['storage']['space_sym_percent'] = $perc_sym . ' %';
$data['storage']['space_up'] = cs_filesize($space_up);
$data['storage']['space_up_percent'] = $perc_up . ' %';
$data['storage']['space_temp'] = cs_filesize($space_temp);
$data['storage']['space_temp_percent'] = $perc_temp . ' %';
echo cs_subtemplate(__FILE__, $data, 'clansphere', 'storage');
开发者ID:aberrios,项目名称:WEBTHESGO,代码行数:31,代码来源:storage.php

示例11: cs_translate

// $Id$
$cs_lang = cs_translate('clansphere');
$content = cs_cache_info();
$data['data']['cache_mode'] = $cs_main['cache_mode'];
$data['info']['cache_cleared'] = '';
$data['link']['reload'] = cs_url('clansphere', 'cache');
$data['link']['empty_cache'] = cs_url('clansphere', 'cache', 'clear=1');
if (!empty($_GET['clear'])) {
    cs_cache_clear();
    $content = array();
    $data['info']['cache_cleared'] = cs_html_br(2) . $cs_lang['cache_cleared'];
}
$start = empty($_GET['start']) ? 0 : (int) $_GET['start'];
$data['count']['total'] = count($content);
$data['pages']['show'] = cs_pages('clansphere', 'cache', $data['count']['total'], $start);
if (empty($content)) {
    $data['cache'] = '';
}
$space = 0;
$run = 0;
$end = $start + $account['users_limit'];
$stop = $end > $data['count']['total'] ? $data['count']['total'] : $end;
for ($x = $start; $x < $stop; $x++) {
    $data['cache'][$run]['name'] = $content[$x]['name'];
    $data['cache'][$run]['date'] = cs_date('unix', $content[$x]['time'] - date('Z'), 1);
    $data['cache'][$run]['size'] = cs_filesize($content[$x]['size']);
    $space += $content[$x]['size'];
    $run++;
}
$data['count']['size'] = cs_filesize($space);
echo cs_subtemplate(__FILE__, $data, 'clansphere', 'cache');
开发者ID:aberrios,项目名称:WEBTHESGO,代码行数:31,代码来源:cache.php

示例12: unset

        }
        unset($_SESSION['ajaxuploads'][$file]);
        echo $file . ' deleted';
    } elseif (isset($_POST['upload_name']) and isset($_FILES['' . $_POST['upload_name'] . '']['tmp_name'])) {
        $upload_name = $_POST['upload_name'];
        $file = $_FILES[$upload_name]['tmp_name'];
        $new_name = 'tmp_' . time() . strrchr($_FILES[$upload_name]['name'], '.');
        $error = !cs_upload('cache', $new_name, $_FILES[$upload_name]['tmp_name'], 0);
        if (!isset($_SESSION['ajaxuploads'])) {
            $_SESSION['ajaxuploads'] = array();
        }
        $_SESSION['ajaxuploads'][$upload_name] = $new_name;
        $upload = array();
        $upload['name'] = $upload_name;
        $upload['original_name'] = $_FILES[$upload_name]['name'];
        $upload['size'] = cs_filesize($_FILES[$upload_name]['size']);
        if ($error) {
            $upload['error'] = true;
        }
        echo '<script language="javascript" type="text/javascript">';
        echo 'window.top.Clansphere.ajax.upload_complete(' . json_encode($upload) . ');';
        echo '</script>';
    } else {
        echo '<script language="javascript" type="text/javascript">';
        echo 'alert("no file given");';
        echo '</script>';
    }
} else {
    echo '<script language="javascript" type="text/javascript">';
    echo 'alert("Permission denied");';
    echo '</script>';
开发者ID:aberrios,项目名称:WEBTHESGO,代码行数:31,代码来源:upload.php

示例13: cs_time

    }
}
if (empty($check_user_voted) and isset($_POST['submit']) and empty($_POST['brokenlink'])) {
    $time = cs_time();
    $voted_ip = cs_getip();
    $votes_cells = array('voted_fid', 'users_id', 'voted_time', 'voted_answer', 'voted_ip', 'voted_mod');
    $votes_save = array($file_id, $users_id, $time, $voted_answer, $voted_ip, 'files');
    cs_sql_insert(__FILE__, 'voted', $votes_cells, $votes_save);
    cs_redirect(NULL, 'files', 'view', 'where=' . $file_id);
}
$data['category']['name'] = $cs_file['categories_name'];
$data['category']['id'] = $cs_file['categories_id'];
$data['file']['id'] = $cs_file['files_id'];
$data['file']['name'] = cs_secure($cs_file['files_name']);
$data['file']['version'] = cs_secure($cs_file['files_version']);
$data['file']['size'] = cs_filesize($cs_file['files_size']);
$data['file']['user'] = cs_user($cs_file['users_id'], $cs_file['users_nick'], $cs_file['users_active']);
$data['file']['date'] = cs_date('unix', $cs_file['files_time'], 1);
$data['file']['count'] = cs_secure($cs_file['files_count']);
$data['if']['vote'] = false;
$data['if']['unvoted'] = false;
if (!empty($cs_file['files_vote'])) {
    $data['if']['vote'] = true;
    if (empty($check_user_voted)) {
        $data['votes'] = array();
        $data['if']['unvoted'] = true;
        for ($l = 1; $l < 7; $l++) {
            $data['votes'][$l - 1]['name'] = $l . ' - ' . $cs_lang['vote_' . $l];
            $data['votes'][$l - 1]['value'] = $l;
        }
    } else {
开发者ID:aberrios,项目名称:WEBTHESGO,代码行数:31,代码来源:view.php

示例14: cs_link

     $data['view']['bottom'] = cs_link($view_bottom, 'usersgallery', 'com_view', 'cat_id=' . $cat_id . '&amp;move=' . $move . '&amp;more=0&amp;id=' . $id);
 } else {
     $data['view']['bottom'] = cs_link($view_bottom, 'usersgallery', 'com_view', 'cat_id=' . $cat_id . '&amp;move=' . $move . '&amp;more=1&amp;id=' . $id);
 }
 if ($detail == '1') {
     $data['if']['details'] = TRUE;
     $data['details']['date'] = cs_date('unix', $cs_gallery[$move]['usersgallery_time'], 1);
     $data['details']['description'] = cs_secure($cs_gallery[$move]['usersgallery_description'], 1, 1);
     $img_size = getimagesize("uploads/usersgallery/pics/" . $cs_gallery[$move]['usersgallery_name']);
     $img_width = $img_size[0];
     $img_height = $img_size[1];
     $img_w_h = $img_width / $img_height;
     $data['details']['size'] = $img_width . ' x ' . $img_height . ' Pixel';
     $file = 'uploads/usersgallery/pics/' . $cs_gallery[$move]['usersgallery_name'];
     $size = filesize($file);
     $data['details']['filesize'] = cs_filesize($size);
     $data['details']['count'] = $cs_gallery[$move]['usersgallery_count'] + 1;
     #if voting is allowed
     if (!empty($advanced[0])) {
         $data['if']['vote'] = TRUE;
         $data['if']['vote_now'] = FALSE;
         $data['if']['voted'] = FALSE;
         #if user hasn't voted yet
         if (empty($check_user_voted)) {
             $data['if']['vote_now'] = TRUE;
             $data['form']['action'] = cs_url('usersgallery', 'com_view', 'cat_id=' . $cat_id . '&amp;move=' . $move . '&amp;more=1&amp;id=' . $id);
             $levels = 1;
             $voted_answer = 1;
             $data['vote']['options'] = '';
             while ($levels < 7) {
                 $voted_answer == $levels ? $sel = 1 : ($sel = 0);
开发者ID:aberrios,项目名称:WEBTHESGO,代码行数:31,代码来源:com_view.php

示例15: elseif

}
if (!isset($_POST['submit'])) {
    $data['head']['body'] = $cs_lang['body_picture'];
} elseif (!empty($error)) {
    $data['head']['body'] = $error;
}
if (!empty($error) or !isset($_POST['submit'])) {
    $data['head']['getmsg'] = cs_getmsg();
    $matches[1] = $cs_lang['pic_infos'];
    $return_types = '';
    foreach ($img_filetypes as $add) {
        $return_types .= empty($return_types) ? $add : ', ' . $add;
    }
    $matches[2] = $cs_lang['max_width'] . ': ' . $op_wars['max_width'] . ' px' . cs_html_br(1);
    $matches[2] .= $cs_lang['max_height'] . ': ' . $op_wars['max_height'] . ' px' . cs_html_br(1);
    $matches[2] .= $cs_lang['max_size'] . ': ' . cs_filesize($op_wars['max_size']) . cs_html_br(1);
    $matches[2] .= $cs_lang['filetypes'] . $return_types;
    $data['picup']['clip'] = cs_abcode_clip($matches);
    $data['wars']['id'] = $cs_wars_id;
    if (empty($war_string)) {
        $data['pictures'][0]['view_link'] = $cs_lang['nopic'];
        $data['pictures'][0]['remove_link'] = '';
    } else {
        $run = 0;
        foreach ($war_pics as $pic) {
            $link = cs_html_img('uploads/wars/thumb-' . $pic);
            $data['pictures'][$run]['view_link'] = cs_html_link('uploads/wars/picture-' . $pic, $link) . ' ';
            $set = 'id=' . $cs_wars_id . '&amp;delete=' . ($run + 1);
            $data['pictures'][$run]['remove_link'] = cs_link($cs_lang['remove'], 'wars', 'picture', $set);
            $run++;
        }
开发者ID:aberrios,项目名称:WEBTHESGO,代码行数:31,代码来源:picture.php


注:本文中的cs_filesize函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。