<?php } ?> <p></p> <form name="dialog" method="POST" action="/<?php echo $ADMIN; ?>/articles/files/do_add.php?archive=<?php echo (int) $inArchive; ?>" enctype="multipart/form-data" onsubmit="return <?php camp_html_fvalidate(); ?>;"> <?php echo SecurityToken::FormParameter(); ?> <table border="0" cellspacing="0" cellpadding="0" class="box_table"> <tr> <td colspan="2"> <b><?php putGS("Attach File to Article"); ?></b> <hr noshade size="1" color="black" /> </td> </tr> <tr> <td align="right"><?php putGS("File"); ?>:</td> <td> <input type="hidden" name="MAX_FILE_SIZE" value="<?php p(intval(camp_convert_bytes(SystemPref::Get('MaxUploadFileSize')))); ?>" /> <input type="file" name="f_file" size="32" class="input_file" /><br /> <?php putGS("Maximum Upload Size"); p(" = " . SystemPref::Get('MaxUploadFileSize')); ?> </td> </tr> <tr> <td align="right"><?php putGS("Description"); ?>:</td> <td> <input type="text" name="f_description" value="" size="32" class="input_text" alt="blank" emsg="<?php putGS("Please enter a description for the file."); ?>" /> </td> </tr> <tr> <td align="left" colspan="2" style="padding-left: 15px;"><?php putGS("Should this file only be available for this translation of the article, or for all translations?"); ?></td> </tr> <tr> <td colspan="2" class="indent" style="padding-left: 30px;">
// Session life time SystemPref::Set('SiteSessionLifeTime', $f_session_lifetime); // Keyword Separator SystemPref::Set("KeywordSeparator", $f_keyword_separator); // Number of failed login attempts if ($f_login_num >= 0) { SystemPref::Set("LoginFailedAttemptsNum", $f_login_num); } // Max Upload File Size $max_upload_filesize_bytes = camp_convert_bytes($f_max_upload_filesize); if ($max_upload_filesize_bytes > 0 && $max_upload_filesize_bytes <= min(camp_convert_bytes(ini_get('post_max_size')), camp_convert_bytes(ini_get('upload_max_filesize')))) { SystemPref::Set("MaxUploadFileSize", $f_max_upload_filesize); } else { $msg_ok = 0; camp_html_add_msg(getGS('Invalid Max Upload File Size value submitted')); } // SMTP Host/Port if (empty($f_smtp_host)) { $f_smtp_host = 'localhost'; } SystemPref::Set('SMTPHost', $f_smtp_host); if ($f_smtp_port <= 0) { $f_smtp_port = 25; } SystemPref::Set('SMTPPort', $f_smtp_port);
<td colspan="2"> <b><?php echo $translator->trans("Attach File to Article", array(), 'article_files'); ?> </b> <hr noshade size="1" color="black" /> </td> </tr> <tr> <td align="right"><?php echo $translator->trans("File"); ?> :</td> <td> <input type="hidden" name="MAX_FILE_SIZE" value="<?php p(intval(camp_convert_bytes($preferencesService->MaxUploadFileSize))); ?> " /> <input type="file" name="f_file" size="32" class="input_file" /><br /> <?php echo $translator->trans("Maximum Upload Size", array(), 'article_files'); p(" = " . $preferencesService->MaxUploadFileSize); ?> </td> </tr> <tr> <td align="right"><?php echo $translator->trans("Description"); ?> :</td> <td>
/** * Get max file size * * @return int */ public function getMaxFileSize() { $preferencesService = \Zend_Registry::get('container')->getService('system_preferences_service'); $maxFileSize = $preferencesService->MaxProfileImageFileSize ?: ini_get('upload_max_filesize'); return camp_convert_bytes($maxFileSize); }
<td colspan="2"> <b><?php putGS("Attach File to Article"); ?> </b> <hr noshade size="1" color="black" /> </td> </tr> <tr> <td align="right"><?php putGS("File"); ?> :</td> <td> <input type="hidden" name="MAX_FILE_SIZE" value="<?php p(intval(camp_convert_bytes(SystemPref::Get('MaxUploadFileSize')))); ?> " /> <input type="file" name="f_file" size="32" class="input_file" /><br /> <?php putGS("Maximum Upload Size"); p(" = " . SystemPref::Get('MaxUploadFileSize')); ?> </td> </tr> <tr> <td align="right"><?php putGS("Description"); ?> :</td> <td>
<body> <br> <FORM NAME="dialog" METHOD="POST" ACTION="do_add.php" ENCTYPE="multipart/form-data" onsubmit="return <?php camp_html_fvalidate(); ?>;"> <?php echo SecurityToken::FormParameter(); ?> <TABLE BORDER="0" CELLSPACING="0" CELLPADDING="6" class="table_input"> <TR> <TD COLSPAN="2"> <B><?php putGS("Attach File to Poll Answer"); ?></B> <HR NOSHADE SIZE="1" COLOR="BLACK"> </TD> </TR> <TR> <TD ALIGN="RIGHT" ><?php putGS("File"); ?>:</TD> <TD> <INPUT TYPE="HIDDEN" NAME="MAX_FILE_SIZE" value="<?php p(intval(camp_convert_bytes(SystemPref::Get('MaxUploadFileSize')))); ?>" /> <INPUT TYPE="FILE" NAME="f_file" SIZE="32" class="input_file" /><BR /> <?php putGS("Maximum Upload Size"); p(" = " . SystemPref::Get('MaxUploadFileSize')); ?> </TD> </TR> <TR> <TD ALIGN="RIGHT" ><?php putGS("Description"); ?>:</TD> <TD> <INPUT TYPE="TEXT" NAME="f_description" VALUE="" SIZE="32" class="input_text" alt="blank" emsg="<?php putGS("Please enter a description for the file."); ?>"> </TD> </TR> <TR> <TD ALIGN="left" colspan="2" style="padding-left: 15px;"><?php putGS("Should this file only be available for this translation, or for all translations?"); ?></TD> </TR> <TR> <TD colspan="2" class="indent" style="padding-left: 30px;">