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


PHP parsebytesize函数代码示例

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


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

示例1: showMemoryUsage

function showMemoryUsage()
{
    $locale = array();
    include LOCALE . LOCALESET . "global.php";
    $memory_allocated = parsebytesize(memory_get_peak_usage(TRUE));
    $memory_used = parsebytesize(memory_get_peak_usage(FALSE));
    return " | " . $locale['global_174'] . ": " . $memory_used . "/" . $memory_allocated;
}
开发者ID:php-fusion,项目名称:PHP-Fusion,代码行数:8,代码来源:theme_functions_include.php

示例2: theme_uploader

 public static function theme_uploader()
 {
     global $locale, $aidlink, $defender;
     if (isset($_POST['upload'])) {
         require_once INCLUDES . "infusions_include.php";
         $src_file = 'theme_files';
         $target_folder = THEMES;
         $valid_ext = '.zip';
         $max_size = 5 * 1000 * 1000;
         $upload = upload_file($src_file, '', $target_folder, $valid_ext, $max_size);
         if ($upload['error'] != '0') {
             $defender->stop();
             switch ($upload['error']) {
                 case 1:
                     addNotice('danger', sprintf($locale['theme_error_001'], parsebytesize($max_size, 2)));
                     break;
                 case 2:
                     addNotice('danger', $locale['theme_error_002']);
                     break;
                 case 3:
                     addNotice('danger', $locale['theme_error_003']);
                     break;
                 case 4:
                     addNotice('danger', $locale['theme_error_004']);
                     break;
                 default:
                     addNotice('danger', $locale['theme_error_003']);
             }
         } else {
             $target_file = $target_folder . $upload['target_file'];
             if (is_file($target_file)) {
                 $path = pathinfo(realpath($target_file), PATHINFO_DIRNAME);
                 if (class_exists('ZipArchive')) {
                     $zip = new ZipArchive();
                     $res = $zip->open($target_file);
                     if ($res === TRUE) {
                         // checks if first folder is theme.php
                         if ($zip->locateName('theme.php') !== FALSE) {
                             // extract it to the path we determined above
                             $zip->extractTo($path);
                             addNotice('success', $locale['theme_success_001']);
                         } else {
                             $defender->stop();
                             addNotice('danger', $locale['theme_error_005']);
                         }
                         $zip->close();
                         @unlink($target_file);
                         redirect(FUSION_SELF . $aidlink);
                     } else {
                         addNotice('danger', $locale['theme_error_005']);
                         @unlink($target_file);
                         redirect(FUSION_SELF . $aidlink);
                     }
                 } else {
                     addNotice('warning', $locale['theme_error_006']);
                     @unlink($target_file);
                     redirect(FUSION_SELF . $aidlink);
                 }
             }
         }
     }
     echo openform('inputform', 'post', FUSION_SELF . $aidlink, array('enctype' => 1, 'max_tokens' => 1));
     echo form_fileinput('theme_files', $locale['theme_1007'], '', array());
     echo form_button('upload', $locale['theme_1007'], 'upload theme', array('class' => 'btn btn-primary'));
     echo closeform();
 }
开发者ID:php-fusion,项目名称:PHP-Fusion,代码行数:66,代码来源:Admin.php

示例3: verify_image_upload


//.........这里部分代码省略.........
                                 if ($image_res[0] < $thumb2_width && $image_res[1] < $thumb2_height) {
                                     $noThumb = TRUE;
                                     $image_info['thumb2_name'] = $image_info['image_name'];
                                     $image_info['thumb2'] = TRUE;
                                 } else {
                                     if (!file_exists($thumb2_folder)) {
                                         mkdir($thumb2_folder, 0755, TRUE);
                                     }
                                     $image_name_t2 = filename_exists($thumb2_folder, $image_name . $thumb2_suffix . $image_ext);
                                     $image_info['thumb2_name'] = $image_name_t2;
                                     $image_info['thumb2'] = TRUE;
                                     if ($thumb2_ratio == 0) {
                                         createthumbnail($filetype, $target_folder . $image_name_full, $thumb2_folder . $image_name_t2, $thumb2_width, $thumb2_height);
                                     } else {
                                         createsquarethumbnail($filetype, $target_folder . $image_name_full, $thumb2_folder . $image_name_t2, $thumb2_width);
                                     }
                                 }
                             }
                             if ($delete_original && !$noThumb) {
                                 unlink($target_folder . $image_name_full);
                                 $image_info['image'] = FALSE;
                             }
                         }
                     }
                 } else {
                     $image_info = array("error" => 5);
                 }
                 if ($image_info['error'] != 0) {
                     $this->stop();
                     // return FALSE if possible
                     switch ($image_info['error']) {
                         case 1:
                             // Invalid file size
                             addNotice('danger', sprintf($locale['df_416'], parsebytesize($this->field_config['max_byte'])));
                             self::setInputError($this->field_name);
                             break;
                         case 2:
                             // Unsupported image type
                             addNotice('danger', sprintf($locale['df_417'], ".gif .jpg .png"));
                             self::setInputError($this->field_name);
                             break;
                         case 3:
                             // Invalid image resolution
                             addNotice('danger', sprintf($locale['df_421'], $this->field_config['max_width'], $this->field_config['max_height']));
                             self::setInputError($this->field_name);
                             break;
                         case 4:
                             // Invalid query string
                             addNotice('danger', $locale['df_422']);
                             self::setInputError($this->field_name);
                             break;
                         case 5:
                             // Image not uploaded
                             addNotice('danger', $locale['df_423']);
                             self::setInputError($this->field_name);
                             break;
                     }
                     $result[$i] = $image_info;
                 } else {
                     $result[$i] = $image_info;
                 }
             }
             // end for
             return $result;
         } else {
             return array();
开发者ID:php-fusion,项目名称:PHP-Fusion,代码行数:67,代码来源:defender.inc.php

示例4: add_to_title

        }
        add_to_title($locale['global_200'] . $locale['news_0400']);
        echo "<div class='panel panel-default tbl-border'>\n<div class='panel-body'>\n";
        echo "<div class='alert alert-info m-b-20 submission-guidelines'>" . str_replace("[SITENAME]", fusion_get_settings("sitename"), $locale['news_0703']) . "</div>\n";
        echo openform('submit_form', 'post', BASEDIR . "submit.php?stype=n", array("enctype" => $news_settings['news_allow_submission_files'] ? TRUE : FALSE));
        echo form_text('news_subject', $locale['news_0200'], $criteriaArray['news_subject'], array("required" => TRUE, "inline" => TRUE));
        if (multilang_table("NS")) {
            echo form_select('news_language', $locale['global_ML100'], $criteriaArray['news_language'], array("options" => fusion_get_enabled_languages(), "placeholder" => $locale['choose'], "width" => "250px", "inline" => TRUE));
        } else {
            echo form_hidden('news_language', '', $criteriaArray['news_language']);
        }
        echo form_select('news_keywords', $locale['news_0205'], $criteriaArray['news_keywords'], array("max_length" => 320, "inline" => TRUE, "placeholder" => $locale['news_0205a'], "width" => "100%", "error_text" => $locale['news_0255'], "tags" => TRUE, "multiple" => TRUE));
        echo form_select_tree("news_cat", $locale['news_0201'], $criteriaArray['news_cat'], array("width" => "250px", "inline" => TRUE, "parent_value" => $locale['news_0202'], "query" => multilang_table("NS") ? "WHERE news_cat_language='" . LANGUAGE . "'" : ""), DB_NEWS_CATS, "news_cat_name", "news_cat_id", "news_cat_parent");
        if ($news_settings['news_allow_submission_files']) {
            $file_input_options = array('upload_path' => IMAGES_N, 'max_width' => $news_settings['news_photo_max_w'], 'max_height' => $news_settings['news_photo_max_h'], 'max_byte' => $news_settings['news_photo_max_b'], 'thumbnail' => 1, 'thumbnail_w' => $news_settings['news_thumb_w'], 'thumbnail_h' => $news_settings['news_thumb_h'], 'thumbnail_folder' => 'thumbs', 'delete_original' => 0, 'thumbnail2' => 1, 'thumbnail2_w' => $news_settings['news_photo_w'], 'thumbnail2_h' => $news_settings['news_photo_h'], 'type' => 'image', "inline" => TRUE);
            echo form_fileinput("news_image", $locale['news_0216'], "", $file_input_options);
            echo "<div class='small col-sm-offset-3 m-b-10'><span class='p-l-15'>" . sprintf($locale['news_0217'], parsebytesize($news_settings['news_photo_max_b'])) . "</span></div>\n";
            $alignOptions = array('pull-left' => $locale['left'], 'news-img-center' => $locale['center'], 'pull-right' => $locale['right']);
            echo form_select('news_ialign', $locale['news_0218'], $criteriaArray['news_ialign'], array("options" => $alignOptions, "inline" => TRUE));
        }
        echo form_textarea('news_news', $locale['news_0203'], $criteriaArray['news_snippet'], array("required" => TRUE, "html" => TRUE, "form_name" => "submit_form", "autosize" => fusion_get_settings("tinymce_enabled") ? FALSE : TRUE));
        echo form_textarea('news_body', $locale['news_0203b'], $criteriaArray['news_body'], array("required" => $news_settings['news_extended_required'] ? TRUE : FALSE, "html" => TRUE, "form_name" => "submit_form", "autosize" => fusion_get_settings("tinymce_enabled") ? FALSE : TRUE));
        echo fusion_get_settings("site_seo") ? "" : form_button('preview_news', $locale['news_0240'], $locale['news_0240'], array('class' => 'btn-primary m-r-10'));
        echo form_button('submit_news', $locale['news_0700'], $locale['news_0700'], array('class' => 'btn-primary'));
        echo closeform();
        echo "</div>\n</div>\n";
    }
} else {
    echo "<div class='well text-center'>" . $locale['news_0138'] . "</div>\n";
}
closetable();
开发者ID:knapnet,项目名称:PHP-Fusion,代码行数:31,代码来源:news_submit.php

示例5: sprintf

     echo "<input type='file' name='download_file' class='textbox' style='width:150px;' /><br />\n";
     echo sprintf($locale['433'], parsebytesize($settings['download_max_b']), str_replace(',', ' ', $settings['download_types'])) . "<br />\n";
     echo "<label><input type='checkbox' name='calc_upload' id='calc_upload' value='1' /> " . $locale['432'] . "</label>\n";
 }
 echo "</td>\n</tr>\n";
 if ($settings['download_screenshot']) {
     echo "<tr>\n";
     echo "<td class='tbl1' style='width:80px; vertical-align:top;'>" . $locale['434'] . "</td>\n<td class='tbl1' style='vertical-align:top;'>\n";
     if (!empty($download_image) && !empty($download_image_thumb)) {
         echo "<img src='" . DOWNLOADS . "images/" . $download_image_thumb . "' /><br />\n";
         echo "<label><input type='checkbox' name='del_image' value='1' /> " . $locale['431'] . "</label>\n";
         echo "<input type='hidden' name='download_image' value='" . $download_image . "' />";
         echo "<input type='hidden' name='download_image_thumb' value='" . $download_image_thumb . "' />";
     } else {
         echo "<input type='file' name='download_image' class='textbox' style='width:150px;' /><br />\n";
         echo sprintf($locale['433b'], parsebytesize($settings['download_screen_max_b']), str_replace(',', ' ', ".jpg,.gif,.png"), $settings['download_screen_max_w'], $settings['download_screen_max_h']) . "<br />\n";
     }
     echo "</td>\n</tr>\n";
 }
 echo "<tr>\n";
 echo "<td class='tbl1' style='width:80px;'>" . $locale['423'] . "</td>\n";
 echo "<td class='tbl1'><select name='download_cat' class='textbox'>\n" . $editlist . "</select></td>\n";
 echo "</tr>\n";
 echo "<tr>\n<td class='tbl1' style='width:80px;'>" . $locale['424'] . "</td>\n";
 echo "<td class='tbl1'><input type='text' name='download_license' value='" . $download_license . "' class='textbox' style='width:150px;' /></td>\n";
 echo "</tr>\n";
 echo "<tr>\n<td class='tbl1' style='width:80px;'>" . $locale['425'] . "</td>\n";
 echo "<td class='tbl1'><input type='text' name='download_os' value='" . $download_os . "' class='textbox' style='width:150px;' /></td>\n";
 echo "</tr>\n";
 echo "<tr>\n<td class='tbl1' style='width:80px;'>" . $locale['426'] . "</td>\n";
 echo "<td class='tbl1'><input type='text' name='download_version' value='" . $download_version . "' class='textbox' style='width:150px;' /></td>\n";
开发者ID:dioda,项目名称:phpfusion,代码行数:31,代码来源:downloads.php

示例6: dbquery

 echo "<!--sub_forum_post_message-->";
 if ($data['post_attachments'] > 0) {
     // Pimped: Multi-Upload
     $att_result = dbquery("SELECT attach_id, attach_ext, attach_name, attach_counter\r\n\t\t\tFROM " . DB_FORUM_ATTACHMENTS . " WHERE post_id='" . (int) $data['post_id'] . "'");
     if (dbrows($att_result)) {
         $print_files = '';
         $print_images = '';
         $count_files = 0;
         $count_images = 0;
         while ($att_data = dbarray($att_result)) {
             if (in_array($att_data['attach_ext'], $imagetypes) && file_exists(FORUM_ATT . $att_data['attach_name']) && @getimagesize(FORUM_ATT . $att_data['attach_name'])) {
                 $print_images .= "\n" . display_image($att_data['attach_name']) . "<br />[" . parsebytesize(filesize(FORUM_ATT . $att_data['attach_name'])) . "]<br /><br />\n";
                 $count_images++;
             } elseif (file_exists(FORUM_ATT . $att_data['attach_name'])) {
                 $print_files .= "\n<a href='" . FORUM . "file.php?getfile=" . $att_data['attach_id'] . "'>" . $att_data['attach_name'] . "</a>";
                 $print_files .= " [" . parsebytesize(filesize(FORUM_ATT . $att_data['attach_name']));
                 $print_files .= ", " . sprintf($locale['507c'], $att_data['attach_counter']) . "]<br />\n";
                 $count_files++;
             }
         }
         if ($print_files != '') {
             echo "\n<fieldset class='forum_attachments'>";
             echo "<legend class='forum_attachments_legend'>" . profile_link($data['user_id'], $data['user_name'], $data['user_status']) . ($count_files > 1 ? $locale['507b'] : $locale['507']) . "</legend>";
             echo "<div class='forum_attachments_content'>" . $print_files . "</div>";
             echo "</fieldset>\n";
         }
         if ($print_images != '') {
             if ($print_files != '') {
                 echo "<br />";
             }
             echo "\n<fieldset class='forum_attachments'>";
开发者ID:MichaelFichtner,项目名称:RadioLaFamilia,代码行数:31,代码来源:viewthread.php

示例7: sprintf

 if (iMOD || iSUPERADMIN) {
     echo "<label><input type='checkbox' name='sticky_thread' value='1'" . $sticky_thread_check . " /> " . $locale['480'] . "</label><br />\n";
     echo "<label><input type='checkbox' name='lock_thread' value='1'" . $lock_thread_check . " /> " . $locale['481'] . "</label><br />\n";
 }
 echo "<label><input type='checkbox' name='disable_smileys' value='1'" . $disable_smileys_check . " /> " . $locale['482'] . "</label>";
 if (array_key_exists("user_sig", $userdata) && $userdata['user_sig']) {
     echo "<br />\n<label><input type='checkbox' name='show_sig' value='1'" . $sig_checked . " /> " . $locale['483'] . "</label>";
 }
 if ($settings['thread_notify']) {
     echo "<br />\n<label><input type='checkbox' name='notify_me' value='1'" . $notify_checked . " /> " . $locale['486'] . "</label>";
 }
 echo "</td>\n</tr>\n";
 if ($fdata['forum_attach'] && checkgroup($fdata['forum_attach'])) {
     echo "<tr>\n<td width='145' class='tbl2'>" . $locale['464'] . "</td>\n";
     echo "<td class='tbl1'><input type='file' name='attach' class='textbox' style='width:200px;' /><br />\n";
     echo "<span class='small2'>" . sprintf($locale['466'], parsebytesize($settings['attachmax']), str_replace(',', ' ', $settings['attachtypes'])) . "</span></td>\n";
     echo "</tr>\n";
 }
 if ($fdata['forum_poll'] && checkgroup($fdata['forum_poll'])) {
     echo "<tr>\n<td align='center' colspan='2' class='tbl2'>" . $locale['467'] . "</td>\n";
     echo "</tr>\n<tr>\n";
     echo "<td width='145' class='tbl2'>" . $locale['469'] . "</td>\n";
     echo "<td class='tbl1'><input type='text' name='poll_title' value='" . $poll_title . "' class='textbox' maxlength='255' style='width:250px' /></td>\n";
     echo "</tr>\n";
     $i = 1;
     if (isset($poll_opts) && is_array($poll_opts) && count($poll_opts)) {
         foreach ($poll_opts as $poll_option) {
             echo "<tr>\n<td width='145' class='tbl2'>" . $locale['470'] . " " . $i . "</td>\n";
             echo "<td class='tbl1'><input type='text' name='poll_options[{$i}]' value='" . $poll_option . "' class='textbox' maxlength='255' style='width:250px'>";
             if ($i == count($poll_opts)) {
                 echo " <input type='submit' name='add_poll_option' value='" . $locale['471'] . "' class='button' />";
开发者ID:roniwahyu,项目名称:AKEUDA,代码行数:31,代码来源:postnewthread.php

示例8: get_blog_image_path

    echo "<div class='col-xs-12 col-sm-6'>\n";
    $image_thumb = get_blog_image_path($data['blog_image'], $data['blog_image_t1'], $data['blog_image_t2']);
    echo "<label>" . thumbnail($image_thumb, '100px');
    echo "<input type='checkbox' name='del_image' value='y' /> " . $locale['delete'] . "</label>\n";
    echo "</div>\n";
    echo "<div class='col-xs-12 col-sm-6'>\n";
    $alignOptions = array('pull-left' => $locale['left'], 'blog-img-center' => $locale['center'], 'pull-right' => $locale['right']);
    echo form_select('blog_ialign', $locale['blog_0442'], $data['blog_ialign'], array("options" => $alignOptions, "inline" => FALSE));
    echo "</div>\n</div>\n";
    echo "<input type='hidden' name='blog_image' value='" . $data['blog_image'] . "' />\n";
    echo "<input type='hidden' name='blog_image_t1' value='" . $data['blog_image_t1'] . "' />\n";
    echo "<input type='hidden' name='blog_image_t2' value='" . $data['blog_image_t2'] . "' />\n";
} else {
    $file_input_options = array('upload_path' => IMAGES_B, 'max_width' => $blog_settings['blog_photo_max_w'], 'max_height' => $blog_settings['blog_photo_max_h'], 'max_byte' => $blog_settings['blog_photo_max_b'], 'thumbnail' => 1, 'thumbnail_w' => $blog_settings['blog_thumb_w'], 'thumbnail_h' => $blog_settings['blog_thumb_h'], 'thumbnail_folder' => 'thumbs', 'delete_original' => 0, 'thumbnail2' => 1, 'thumbnail2_w' => $blog_settings['blog_photo_w'], 'thumbnail2_h' => $blog_settings['blog_photo_h'], 'type' => 'image');
    echo form_fileinput("blog_image", $locale['blog_0439'], "", $file_input_options);
    echo "<div class='small m-b-10'>" . sprintf($locale['blog_0440'], parsebytesize($blog_settings['blog_photo_max_b'])) . "</div>\n";
    $alignOptions = array('pull-left' => $locale['left'], 'news-img-center' => $locale['center'], 'pull-right' => $locale['right']);
    echo form_select('blog_ialign', $locale['blog_0442'], $data['blog_ialign'], array("options" => $alignOptions));
}
closeside();
openside('');
echo "<label><input type='checkbox' name='blog_draft' value='yes'" . ($data['blog_draft'] ? "checked='checked'" : "") . " /> " . $locale['blog_0431'] . "</label><br />\n";
echo "<label><input type='checkbox' name='blog_sticky' value='yes'" . ($data['blog_sticky'] ? "checked='checked'" : "") . "  /> " . $locale['blog_0432'] . "</label><br />\n";
if (fusion_get_settings("tinymce_enabled") != 1) {
    echo "<label><input type='checkbox' name='line_breaks' value='yes'" . ($data['blog_breaks'] ? "checked='checked'" : "") . " /> " . $locale['blog_0433'] . "</label><br />\n";
}
closeside();
echo "</div>\n<div class='col-xs-12 col-sm-12 col-md-5 col-lg-4'>\n";
openside("");
if (!fusion_get_settings("comments_enabled") || !fusion_get_settings("ratings_enabled")) {
    $sys = "";
开发者ID:php-fusion,项目名称:PHP-Fusion,代码行数:31,代码来源:blog.php

示例9: display_news_form


//.........这里部分代码省略.........
        }
    }
    echo "<div class='m-t-20'>\n";
    $news_settings = get_settings("news");
    echo openform('news_form', 'post', $formaction, array('enctype' => 1));
    echo "<div class='row'>\n";
    echo "<div class='col-xs-12 col-sm-12 col-md-7 col-lg-8'>\n";
    echo form_hidden('news_id', "", $data['news_id']);
    echo form_text('news_subject', $locale['news_0200'], $data['news_subject'], array('required' => 1, 'max_length' => 200, 'error_text' => $locale['news_0250']));
    echo form_select('news_keywords', $locale['news_0205'], $data['news_keywords'], array("max_length" => 320, "placeholder" => $locale['news_0205a'], "width" => "100%", "error_text" => $locale['news_0255'], "tags" => TRUE, "multiple" => TRUE));
    echo "<div class='pull-left m-r-10 display-inline-block'>\n";
    echo form_datepicker('news_start', $locale['news_0206'], $data['news_start'], array('placeholder' => $locale['news_0208'], "join_to_id" => "news_end"));
    echo "</div>\n<div class='pull-left m-r-10 display-inline-block'>\n";
    echo form_datepicker('news_end', $locale['news_0207'], $data['news_end'], array('placeholder' => $locale['news_0208'], "join_from_id" => "news_start"));
    echo "</div>\n";
    echo "</div>\n<div class='col-xs-12 col-sm-12 col-md-5 col-lg-4'>\n";
    openside('');
    echo form_select_tree("news_cat", $locale['news_0201'], $data['news_cat'], array("width" => "100%", "inline" => TRUE, "parent_value" => $locale['news_0202'], "query" => multilang_table("NS") ? "WHERE news_cat_language='" . LANGUAGE . "'" : ""), DB_NEWS_CATS, "news_cat_name", "news_cat_id", "news_cat_parent");
    echo form_select('news_visibility', $locale['news_0209'], $data['news_visibility'], array('options' => fusion_get_groups(), 'placeholder' => $locale['choose'], 'width' => '100%', "inline" => TRUE));
    if (multilang_table("NS")) {
        echo form_select('news_language', $locale['global_ML100'], $data['news_language'], array('options' => fusion_get_enabled_languages(), 'placeholder' => $locale['choose'], 'width' => '100%', "inline" => TRUE));
    } else {
        echo form_hidden('news_language', '', $data['news_language']);
    }
    echo form_button('cancel', $locale['cancel'], $locale['cancel'], array('class' => 'btn-default m-r-10'));
    echo form_button('save', $locale['news_0241'], $locale['news_0241'], array('class' => 'btn-success'));
    echo form_button("save_and_close", "Save and Close", "save_and_close", array("class" => "btn-primary m-l-10"));
    closeside();
    echo "</div>\n</div>\n";
    $snippetSettings = array("required" => TRUE, "preview" => TRUE, "html" => TRUE, "autosize" => TRUE, "placeholder" => $locale['news_0203a'], "form_name" => "news_form");
    if (fusion_get_settings("tinymce_enabled")) {
        $snippetSettings = array("required" => TRUE, "type" => "tinymce", "tinymce" => "advanced");
    }
    echo form_textarea('news_news', $locale['news_0203'], $data['news_news'], $snippetSettings);
    if (!fusion_get_settings("tinymce_enabled")) {
        $extendedSettings = array("preview" => TRUE, "html" => TRUE, "autosize" => TRUE, "placeholder" => $locale['news_0203b'], "form_name" => "news_form");
    } else {
        $extendedSettings = array("type" => "tinymce", "tinymce" => "advanced");
    }
    echo form_textarea('news_extended', $locale['news_0204'], $data['news_extended'], $extendedSettings);
    // second row
    echo "<div class='row'>\n";
    echo "<div class='col-xs-12 col-sm-12 col-md-7 col-lg-8'>\n";
    openside('');
    if ($data['news_image'] != "" && $data['news_image_t1'] != "") {
        $image_thumb = get_news_image_path($data['news_image'], $data['news_image_t1'], $data['news_image_t2']);
        if (!$image_thumb) {
            $image_thumb = IMAGES . "imagenotfound70.jpg";
        }
        echo "<div class='row'>\n";
        echo "<div class='col-xs-12 col-sm-6'>\n";
        echo "<label><img class='img-responsive img-thumbnail' src='" . $image_thumb . "' alt='" . $locale['news_0216'] . "' /><br />\n";
        echo "<input type='checkbox' name='del_image' value='y' /> " . $locale['delete'] . "</label>\n";
        echo "</div>\n";
        echo "<div class='col-xs-12 col-sm-6'>\n";
        $alignOptions = array('pull-left' => $locale['left'], 'news-img-center' => $locale['center'], 'pull-right' => $locale['right']);
        echo form_select('news_ialign', $locale['news_0218'], $data['news_ialign'], array("options" => $alignOptions, "inline" => FALSE));
        echo "</div>\n</div>\n";
        echo "<input type='hidden' name='news_image' value='" . $data['news_image'] . "' />\n";
        echo "<input type='hidden' name='news_image_t1' value='" . $data['news_image_t1'] . "' />\n";
        echo "<input type='hidden' name='news_image_t2' value='" . $data['news_image_t2'] . "' />\n";
    } else {
        $file_input_options = array('upload_path' => IMAGES_N, 'max_width' => $news_settings['news_photo_max_w'], 'max_height' => $news_settings['news_photo_max_h'], 'max_byte' => $news_settings['news_photo_max_b'], 'thumbnail' => 1, 'thumbnail_w' => $news_settings['news_thumb_w'], 'thumbnail_h' => $news_settings['news_thumb_h'], 'thumbnail_folder' => 'thumbs', 'delete_original' => 0, 'thumbnail2' => 1, 'thumbnail2_w' => $news_settings['news_photo_w'], 'thumbnail2_h' => $news_settings['news_photo_h'], 'type' => 'image');
        echo form_fileinput("news_image", $locale['news_0216'], "", $file_input_options);
        echo "<div class='small m-b-10'>" . sprintf($locale['news_0217'], parsebytesize($news_settings['news_photo_max_b'])) . "</div>\n";
        $alignOptions = array('pull-left' => $locale['left'], 'news-img-center' => $locale['center'], 'pull-right' => $locale['right']);
        echo form_select('news_ialign', $locale['news_0218'], $data['news_ialign'], array("options" => $alignOptions));
    }
    closeside();
    openside('');
    echo "<label><input type='checkbox' name='news_draft' value='yes'" . ($data['news_draft'] ? "checked='checked'" : "") . " /> " . $locale['news_0210'] . "</label><br />\n";
    echo "<label><input type='checkbox' name='news_sticky' value='yes'" . ($data['news_sticky'] ? "checked='checked'" : "") . "  /> " . $locale['news_0211'] . "</label><br />\n";
    echo form_hidden('news_datestamp', '', $data['news_datestamp']);
    if (fusion_get_settings("tinymce_enabled") != 1) {
        echo "<label><input type='checkbox' name='line_breaks' value='yes'" . ($data['news_breaks'] ? "checked='checked'" : "") . " /> " . $locale['news_0212'] . "</label><br />\n";
    }
    closeside();
    echo "</div>\n<div class='col-xs-12 col-sm-12 col-md-5 col-lg-4'>\n";
    openside("");
    if (!fusion_get_settings("comments_enabled") || !fusion_get_settings("ratings_enabled")) {
        $sys = "";
        if (!fusion_get_settings("comments_enabled") && !fusion_get_settings("ratings_enabled")) {
            $sys = $locale['comments_ratings'];
        } elseif (!fusion_get_settings("comments_enabled")) {
            $sys = $locale['comments'];
        } else {
            $sys = $locale['ratings'];
        }
        echo "<div class='alert alert-warning'>" . sprintf($locale['news_0253'], $sys) . "</div>\n";
    }
    echo "<label><input type='checkbox' name='news_allow_comments' value='yes' onclick='SetRatings();'" . ($data['news_allow_comments'] ? "checked='checked'" : "") . " /> " . $locale['news_0213'] . "</label><br/>";
    echo "<label><input type='checkbox' name='news_allow_ratings' value='yes'" . ($data['news_allow_ratings'] ? "checked='checked'" : "") . " /> " . $locale['news_0214'] . "</label>";
    closeside();
    echo "</div>\n</div>\n";
    echo form_button('preview', $locale['news_0240'], $locale['news_0240'], array('class' => 'btn-default m-r-10'));
    echo form_button('save', $locale['news_0241'], $locale['news_0241'], array('class' => 'btn-success'));
    echo form_button("save_and_close", "Save and Close", "save_and_close", array("class" => "btn-primary m-l-10"));
    echo closeform();
    echo "</div>\n";
}
开发者ID:php-fusion,项目名称:PHP-Fusion,代码行数:101,代码来源:news.php

示例10: array

     echo "<div class='row'>\n";
     echo "<div class='col-xs-12 col-sm-6'>\n";
     echo "<label><img class='img-responsive img-thumbnail' src='" . IMAGES_N_T . $callback_data['news_image_t1'] . "' alt='" . $locale['news_0216'] . "' /><br />\n";
     echo "<input type='checkbox' name='del_image' value='y' /> " . $locale['delete'] . "</label>\n";
     echo "</div>\n";
     echo "<div class='col-xs-12 col-sm-6'>\n";
     $alignOptions = array('pull-left' => $locale['left'], 'news-img-center' => $locale['center'], 'pull-right' => $locale['right']);
     echo form_select('news_ialign', $locale['news_0218'], $callback_data['news_ialign'], array("options" => $alignOptions, "inline" => FALSE));
     echo "</div>\n</div>\n";
     echo "<input type='hidden' name='news_image' value='" . $callback_data['news_image'] . "' />\n";
     echo "<input type='hidden' name='news_image_t1' value='" . $callback_data['news_image_t1'] . "' />\n";
     echo "<input type='hidden' name='news_image_t2' value='" . $callback_data['news_image_t2'] . "' />\n";
 } else {
     $file_input_options = array('upload_path' => IMAGES_N, 'max_width' => $news_settings['news_photo_max_w'], 'max_height' => $news_settings['news_photo_max_h'], 'max_byte' => $news_settings['news_photo_max_b'], 'thumbnail' => 1, 'thumbnail_w' => $news_settings['news_thumb_w'], 'thumbnail_h' => $news_settings['news_thumb_h'], 'thumbnail_folder' => 'thumbs', 'delete_original' => 0, 'thumbnail2' => 1, 'thumbnail2_w' => $news_settings['news_photo_w'], 'thumbnail2_h' => $news_settings['news_photo_h'], 'type' => 'image');
     echo form_fileinput("news_image", $locale['news_0216'], "", $file_input_options);
     echo "<div class='small m-b-10'>" . sprintf($locale['news_0217'], parsebytesize($news_settings['news_photo_max_b'])) . "</div>\n";
     $alignOptions = array('pull-left' => $locale['left'], 'news-img-center' => $locale['center'], 'pull-right' => $locale['right']);
     echo form_select('news_ialign', $locale['news_0218'], $callback_data['news_ialign'], array("options" => $alignOptions));
 }
 closeside();
 $snippetSettings = array("required" => TRUE, "preview" => TRUE, "html" => TRUE, "autosize" => TRUE, "placeholder" => $locale['news_0203a'], "form_name" => "inputform");
 if (fusion_get_settings("tinymce_enabled")) {
     $snippetSettings = array("required" => TRUE);
 }
 echo form_textarea('news_news', $locale['news_0203'], $callback_data['news_news'], $snippetSettings);
 echo "</div>\n<div class='col-xs-12 col-sm-12 col-md-5 col-lg-4'>\n";
 openside("");
 echo form_select_tree("news_cat", $locale['news_0201'], $callback_data['news_cat'], array("width" => "100%", "inline" => TRUE, "parent_value" => $locale['news_0202'], "query" => multilang_table("NS") ? "WHERE news_cat_language='" . LANGUAGE . "'" : ""), DB_NEWS_CATS, "news_cat_name", "news_cat_id", "news_cat_parent");
 echo form_select('news_visibility', $locale['news_0209'], $callback_data['news_visibility'], array('options' => fusion_get_groups(), 'placeholder' => $locale['choose'], 'width' => '100%', "inline" => TRUE));
 if (multilang_table("NS")) {
     echo form_select('news_language', $locale['global_ML100'], $callback_data['news_language'], array('options' => fusion_get_enabled_languages(), 'placeholder' => $locale['choose'], 'width' => '100%', "inline" => TRUE));
开发者ID:knapnet,项目名称:PHP-Fusion,代码行数:31,代码来源:news_submissions.php

示例11: str_replace

	<td><input type="text" class="textbox" name="url"
		value="' . $url . '" size="40" maxlegth="200"></td>
</tr>
<tr>
	<td></td>
	<td><span class="small2">' . $locale['PDP220'] . '</span></td>
</tr>';
}
if ($do_edit || empty($pdp->settings['file_ext'])) {
    $src_upload = '';
} else {
    $src_upload = "\n<tr>\n\t<td></td>\n\t<td><strong>" . $locale['PDP133'] . "</strong></td>\n</tr>\n<tr>\n\t<td valign='top'>" . $locale['PDP219'] . ":</td>\n";
    if (!$upload_dir_access) {
        $src_upload .= "<td><span class='small2'>" . str_replace("%s", '<strong>' . $upload_dir . '</strong>', $locale['PDP900'][PDP_EUPDIR]) . "</span></td>";
    } else {
        $src_upload .= "<td><input type='file' class='textbox' name='upload' size='50'></td>\n</tr>\n<tr>\n\t<td></td>\n\t<td><span class='small2'>" . $locale['PDP034'] . ": " . parsebytesize($pdp->settings['file_max']) . " (" . str_replace(",", ", ", $pdp->settings['file_ext']) . ")</span></td>\n";
    }
    $src_upload .= "</tr>\n";
}
// determine what to show and why
$src_read_only = "";
if ($do_edit) {
    $is_external = pdp_is_external($url);
    if (iPDP_MOD) {
    } else {
        $src_ftp = "";
        if (!$is_external) {
            $src_url = "";
            $src_read_only = "<tr><td><b>" . pdp_cleanup_filename($url) . "</b></td></tr>\n";
        }
    }
开发者ID:petemadsen,项目名称:Professional-Download-System,代码行数:31,代码来源:edit_files.php

示例12: array

             if ($data['photo_thumb2']) {
                 $info['photo_thumb'] = IMAGES_G . "/" . $wm_file1;
             }
             $info['photo_filename'] = IMAGES_G . "/" . $wm_file2;
         }
     } else {
         if ($data['photo_thumb2']) {
             $info['photo_thumb'] = INFUSIONS . "gallery/photo.php?photo_id=" . $_GET['photo_id'];
         }
         $info['photo_filename'] = INFUSIONS . "gallery/photo.php?photo_id=" . $_GET['photo_id'] . "&amp;full";
     }
     $info['photo_size'] = @getimagesize(IMAGES_G . $data['photo_filename']);
 } else {
     $info += array("photo_thumb2" => $data['photo_thumb2'] ? IMAGES_G_T . $data['photo_thumb2'] : "", "photo_thumb1" => $data['photo_thumb1'] ? IMAGES_G_T . $data['photo_thumb1'] : "", "photo_filename" => IMAGES_G . $data['photo_filename'], "photo_size" => getimagesize(IMAGES_G . $data['photo_filename']));
 }
 $info += array("photo_description" => $data['photo_description'] ? nl2br(parse_textarea($data['photo_description'])) : '', "photo_byte" => parsebytesize($gallery_settings['photo_watermark'] ? filesize(IMAGES_G . $data['photo_filename']) : filesize(IMAGES_G . $data['photo_filename'])), "photo_comment" => $data['photo_allow_comments'] ? number_format($data['comment_count']) : 0, "photo_ratings" => $data['photo_allow_ratings'] && $data['count_votes'] > 0 ? number_format(ceil($data['sum_rating'] / $data['count_votes'])) : '0');
 if (isset($prev['photo_id']) && isnum($prev['photo_id']) || isset($next['photo_id']) && isnum($next['photo_id'])) {
     if (isset($prev) && isset($first)) {
         $info['nav']['first'] = array('link' => INFUSIONS . "gallery/gallery.php?photo_id=" . $first['photo_id'], 'name' => $locale['459']);
     }
     if (isset($prev)) {
         $info['nav']['prev'] = array('link' => INFUSIONS . "gallery/gallery.php?photo_id=" . $prev['photo_id'], 'name' => $locale['451']);
     }
     if (isset($next)) {
         $info['nav']['next'] = array('link' => INFUSIONS . "gallery/gallery.php?photo_id=" . $next['photo_id'], 'name' => $locale['452']);
     }
     if (isset($next) && isset($last)) {
         $info['nav']['last'] = array('link' => INFUSIONS . "gallery/gallery.php?photo_id=" . $last['photo_id'], 'name' => $locale['460']);
     }
 }
 $info += $data;
开发者ID:knapnet,项目名称:PHP-Fusion,代码行数:31,代码来源:gallery.php

示例13: sprintf

 echo "</tr>\n<tr>\n";
 echo "<td width='100' class='tbl'>" . $locale['423'] . (!(bool) IF_MULTI_LANGUAGE ? '' : " (" . $locale['440'] . ")") . "</td>\n";
 // Pimped
 echo "<td width='80%' class='tbl'><select name='news_cat' class='textbox'>\n";
 echo "<option value='0'>" . $locale['424'] . "</option>\n" . $news_cat_opts . "</select></td>\n";
 echo "</tr>\n<tr>\n";
 echo "<td class='tbl' valign='top'>" . $locale['439'] . ":</td>\n<td class='tbl' valign='top'>";
 if ($news_image != "" && $news_image_t1 != "") {
     echo "<label><img src='" . IMAGES_N_T . $news_image_t2 . "' alt='" . $locale['439'] . "' /><br />\n";
     echo "<input type='checkbox' name='del_image' value='y' /> " . $locale['421'] . "</label>\n";
     echo "<input type='hidden' name='news_image' value='" . $news_image . "' />\n";
     echo "<input type='hidden' name='news_image_t1' value='" . $news_image_t1 . "' />\n";
     echo "<input type='hidden' name='news_image_t2' value='" . $news_image_t2 . "' />\n";
 } else {
     echo "<input type='file' name='news_image' class='textbox' style='width:250px;' /><br />\n";
     echo sprintf($locale['442'], parsebytesize($settings['news_photo_max_b'])) . "\n";
 }
 echo "</td>\n</tr>\n<tr>\n";
 echo "<td valign='top' width='100' class='tbl'>" . $locale['425'] . "</td>\n";
 echo "<td width='80%' class='tbl'><textarea name='body' cols='95' rows='10' class='textbox' style='width:98%'>" . $body . "</textarea></td>\n";
 echo "</tr>\n";
 if (!isset($_COOKIE['news_wysiwyg_editor']) || !$_COOKIE['news_wysiwyg_editor'] || !$settings['wysiwyg_enabled']) {
     echo "<tr>\n<td class='tbl'></td>\n<td class='tbl'>\n";
     echo display_html("inputform", "body", true, true, true, IMAGES_N);
     echo "</td>\n</tr>\n";
 }
 echo "<tr>\n<td valign='top' width='100' class='tbl'>" . $locale['426'] . "</td>\n";
 echo "<td class='tbl'><textarea name='body2' cols='95' rows='10' class='textbox' style='width:98%'>" . $body2 . "</textarea></td>\n";
 echo "</tr>\n";
 if (!isset($_COOKIE['news_wysiwyg_editor']) || !$_COOKIE['news_wysiwyg_editor'] || !$settings['wysiwyg_enabled']) {
     echo "<tr>\n<td class='tbl'></td>\n<td class='tbl'>\n";
开发者ID:MichaelFichtner,项目名称:RadioLaFamilia,代码行数:31,代码来源:news.php

示例14: add_to_head

 echo "<table width='100%' border='0' cellpadding='0' cellspacing='1' class='tbl-border'>\r\n\t<tr>\r\n\t<td width='155'>\r\n\t";
 if ($d_addons['addon_img'] == "" || !file_exists(ADDON_SCRN . "t_" . $d_addons['addon_img'])) {
     echo "<img src='" . ADDON_IMG . "addon_logo.png'>";
 } else {
     add_to_head("<script type='text/javascript' src='lightbox/prototype.js'></script>\r\n    <script type='text/javascript' src='lightbox/scriptaculous.js?load=effects,builder'></script>\r\n    <script type='text/javascript' src='lightbox/lightbox.js'></script>\r\n    <link rel='stylesheet' href='lightbox/lightbox.css' type='text/css' media='screen' />");
     echo "<div align='center'><a href='img/screenshots/" . $d_addons['addon_img'] . "' rel='lightbox' style='outline: none;border:none;'>\r\n    <img src='" . ADDON_SCRN . "t_" . $d_addons['addon_img'] . "' style='outline: none;border:none;'></a></div>\n";
 }
 $status_check = dbarray(dbquery("SELECT addon_author_status FROM " . DB_ADDONS . " WHERE addon_author_name = '" . $d_addons['addon_author_name'] . "'"));
 if ($status_check['addon_author_status'] == '2') {
     echo "<br />\n<center><img src='" . ADDON_IMG . "approved_addon.png' alt='' border='0' /></center>\n";
 }
 if ($d_addons['addon_share_status']) {
     include ADDON_INC . "share_links_include.php";
 }
 echo "</td>\r\n\t<td>\r\n\t<table width='100%' border='0' cellpadding='0' cellspacing='1' class='tbl-border'>\r\n\t<tr>\r\n\t<td class='tbl2' width='80' nowrap><b>" . $locale['addondb401'] . ":</b></td>\r\n\t<td class='tbl1' nowrap>" . $new . " " . $d_addons['addon_name'] . "</td>\r\n\t<td class='tbl1' nowrap rowspan='9' align='center'><b>" . $locale['addondb421'] . $d_addons['addon_name'] . "</b><br />\r\n\t<a href='" . FUSION_SELF . "?download=" . $d_addons['addon_id'] . "' title='" . $locale['addondb502'] . "'><img border='0' src='" . ADDON_IMG . "download.png' alt='' /></a><br />" . $download_count . "\r\n\t<br /><br />";
 echo $locale['addondb440'] . "[" . parsebytesize(filesize(ADDON . "files/" . $d_addons['addon_download'])) . "]";
 echo "</td>\r\n\t</tr>\r\n\t<tr>\r\n\t<td class='tbl2' nowrap><b>" . $locale['addondb402'] . ":</b></td>\r\n\t<td class='tbl1' nowrap>" . $d_addons['addon_version'] . "</td>\r\n\t</tr>\r\n\t<tr>\r\n\t<td class='tbl2' nowrap><b>" . $locale['addondb403'] . ":</b></td>\r\n\t<td class='tbl1' nowrap>" . $d_addons['addon_cat_name'] . "</td>\r\n\t</tr>\r\n\t<tr>\r\n\t<td class='tbl2' nowrap><b>" . $locale['addondb404'] . ":</b></td>\r\n\t<td class='tbl1' nowrap>" . $ver . "&nbsp;(" . $addon_types[$d_addons['addon_type']] . ")</td>\r\n\t</tr>\r\n\t<tr>\r\n\t<td class='tbl2' nowrap><b>" . $locale['addondb405'] . ":</b></td>\n";
 $user_auth = dbarray(dbquery("SELECT \r\n\t                                     user_id, \r\n\t                                     user_name,\r\n\t                                     user_hide_email,  \r\n\t                                     user_status \r\n\t                                     FROM " . DB_USERS . " \r\n\t                                     WHERE \r\n\t                                     user_name = '" . $d_addons['addon_author_name'] . "'\r\n\t                                     "));
 if ($user_auth['user_hide_email'] != "1" && $d_addons['addon_author_email'] != "") {
     $author_email = "<a href='mailto:" . $d_addons['addon_author_email'] . "' title='" . $locale['addondb500'] . "' class='button'><span>" . $locale['addondb419'] . "</span></a>";
 } else {
     $author_email = "";
 }
 if ($d_addons['addon_author_www'] != "") {
     $author_www = " <a href='" . $urlprefix . $d_addons['addon_author_www'] . "' target='_blank' title='" . $locale['addondb501'] . "' class='button'><span>" . $locale['addondb420'] . "</span></a>";
 } else {
     $author_www = "";
 }
 echo "<td class='tbl1' nowrap>" . (isset($user_auth['user_name']) ? profile_link($user_auth['user_id'], $user_auth['user_name'], $user_auth['user_status']) : $d_addons['addon_author_name']) . " " . $author_email . " " . $author_www . "</td>\r\n\t</tr>\n";
 if ($d_addons['addon_co_author_name'] != "") {
     echo "<tr>\r\n\t<td class='tbl2' nowrap><b>" . $locale['addondb405c'] . ":</b></td>\r\n\t<td class='tbl1' nowrap>" . $d_addons['addon_co_author_name'] . "</td>\r\n\t</tr>\n";
开发者ID:xXxthebeastxXx,项目名称:addondb,代码行数:31,代码来源:view.php

示例15: substr

<tr>
	<td align="right">' . $locale['PRP704'] . ':</td>
	<td>
		<input type="text" name="upload_image" value="' . substr($prp->settings['upload_image'], strlen(BASEDIR)) . '" size="50" maxlength="200" class="textbox"><br />' . $locale['prp_status'] . ': ' . $status_upload_image . '</td>
</tr>
<tr>
	<td align="right">' . $locale['PRP722'] . ':</td>
	<td>
		<input type="text" value="' . $prp->settings['image_ext'] . '" size="50" class="textbox" name="image_ext" /><br />
		<span class="small2">' . $locale['PRP713'] . ' ' . $locale['PRP714'] . '</span>
	</td>
</tr>
<tr>
	<td align="right">' . $locale['PRP716'] . ':<br><span class="small2">' . $locale['PRP717'] . '</span></td>
	<td>' . $upload_max_filesize . '<br />
		<input type="text" value="' . $prp->settings['image_max'] . '" size="14" maxlength="12" class="textbox" name="image_max">' . ' =' . parsebytesize($prp->settings['image_max']) . ' (' . $status_image_maxsize . ')<br><span class="small2">' . $locale['PRP719'] . '</span></td>
</tr>
<tr>
	<td align="right">' . $locale['PRP716'] . ':<br><span class="small2">' . $locale['PRP747'] . '</span></td>
	<td>
		<input type="text" name="image_max_w" value="' . $prp->settings['image_max_w'] . '" size="5" maxlength="5" class="textbox">' . ' x <input type="text" name="image_max_h" value="' . $prp->settings['image_max_h'] . '" size="5" maxlength="5" class="textbox">' . ' <span class="small2">' . $locale['PRP748'] . '</span>' . ' <br><input type="checkbox" id="is0" name="image_scale"' . ($prp->settings['image_scale'] == "yes" ? ' checked="checked"' : '') . '> <label for="is0">' . $locale['PRP749'] . '</label>
	</td>
</tr>
<tr>
	<td align="right">' . $locale['PRP760'] . ':</td>
	<td><input type="text" size="5" maxlength="3"' . ' value="' . $prp->settings['default_max_pics'] . '"' . ' class="textbox" name="default_max_pics">' . ' <span class="small2">(' . $locale['PRP731'] . ')</span><br />
		[<span class="small2">' . $locale['PRP761'] . '</span>]
	</td>
</tr>
</tbody>
</table>
开发者ID:simplyianm,项目名称:clububer,代码行数:31,代码来源:settings.php


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