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


PHP FormFactory::generateUniqueFilename方法代码示例

本文整理汇总了PHP中FormFactory::generateUniqueFilename方法的典型用法代码示例。如果您正苦于以下问题:PHP FormFactory::generateUniqueFilename方法的具体用法?PHP FormFactory::generateUniqueFilename怎么用?PHP FormFactory::generateUniqueFilename使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在FormFactory的用法示例。


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

示例1: substr

    ?>
", 0, "<?php 
    echo $_GET['sira'];
    ?>
","<?php 
    echo "dosya alınamadı: {$errorMessage}";
    ?>
");</script>
	<?php 
    die;
}
$fileCount = $_POST['file_count'];
for ($i = 1; $i <= $fileCount; $i++) {
    $input_file_name = $id . "_file_" . $i;
    //Unique Upload Filenames
    $uploadedFilesName = FormFactory::generateUniqueFilename(basename($_FILES[$input_file_name]['name']));
    $target_path = EK_FOLDER . $destination_path . $uploadedFilesName;
    if (!isset($_FILES[$input_file_name])) {
        continue;
    }
    $upload_max_filesize = ini_get('upload_max_filesize');
    $mul = substr($upload_max_filesize, -1);
    $mul = $mul == 'M' ? 1048576 : ($mul == 'K' ? 1024 : ($mul == 'G' ? 1073741824 : 1));
    if ($_FILES[$input_file_name]["size"] == 0 || $_FILES[$input_file_name]["size"] > $mul * (int) $upload_max_filesize && $upload_max_filesize) {
        $errorMessage = "Hata kodu: 252. Dosya boyutu büyük.";
        break;
    }
    if ($sizeLimit != -1) {
        if ($_FILES[$input_file_name]["size"] / 1024 > $sizeLimit) {
            $errorMessage = "Hata kodu: 253. Dosya boyutu büyük. İzin verilen, {$sizeLimit} KB.";
            break;
开发者ID:kaantunc,项目名称:MYK-BOR,代码行数:31,代码来源:file_upload.php

示例2: render

 /**
  * Render the document.
  *
  * @access public
  * @param boolean 	$cache		If true, cache the output
  * @param array		$params		Associative array of attributes
  * @return 	The rendered data
  */
 function render($cache = true, $params = array())
 {
     //Formu PDF'e cevir
     if (isset($_GET['form'])) {
         $form = $_GET['form'];
         $evrak_id = $_GET['id'];
         if ($form < 5) {
             // T1, T2, T3, T4
             global $mainframe;
             $user =& JFactory::getUser();
             $user_id = $user->getOracleUserId();
             if ($form == 1) {
                 $group_id = T1_GROUP_ID;
             } else {
                 if ($form == 2) {
                     $group_id = T2_GROUP_ID;
                 } else {
                     if ($form == 3) {
                         $group_id = T3_GROUP_ID;
                     } else {
                         if ($form == 4) {
                             $group_id = T4_GROUP_ID;
                         }
                     }
                 }
             }
             //AKREDITASYON BASVURU
             $isSektorSorumlusu = FormFactory::sektorSorumlusuMu($user);
             $aut = FormFactory::checkAuthorization($user, $group_id);
             if (!$aut && !$isSektorSorumlusu) {
                 $mainframe->redirect('index.php?', YETKI_MESAJ);
             }
             $personelCount = $this->getPersonelCount($evrak_id);
             $titles = array("Meslek Standardı Hazırlama Başvuru Formu", "Yeterlilik Başvuru Formu", "Belgelendirme Başvuru Formu", "Akreditasyon Başvuru Formu");
             //Title Configuration
             $title = $titles[$form - 1];
             //Unique Filename
             $name = FormFactory::generateUniqueFilename("basvuru_" . $form);
             $titleFont = 'freeserif';
             $titleStyle = 'BI';
             $titleFontSize = 15;
             //Data Configuration
             $dataFont = 'freeserif';
             $dataStyle = '';
             $dataFontSize = 10;
             $pdf = $this->render_InitializePDF(PDF_TIPI_BASVURU, TRUE, PDF_MARGIN_TOP + 10, PDF_MARGIN_HEADER + 10, PDF_MARGIN_FOOTER, 25, 25);
             // ---------------------------------------------------------
             // Form Title
             // set font
             $pdf->SetFont($titleFont, $titleStyle, $titleFontSize);
             // add a page
             if ($form != -5) {
                 //ek degilse yeni sayfa ekle onyazi için
                 $pdf->AddPage();
             }
             // print a line using Cell()
             $pdf->Cell(0, 5, $title, 0, 1, 'C');
             // ---------------------------------------------------------
             // Form Data
             $pdf->SetFont($dataFont, $dataStyle, $dataFontSize);
             // ON YAZI
             if ($form != -5) {
                 //ekleri yazdırırken on yazi koymamak için
                 $this->writeOnyazi($form, $pdf);
             }
             $pdf->Ln(15);
             // HTML
             $pdf->WriteHTML($this->parseTaslak($this->getBuffer(), "basvuru", "ek"), true);
             //$pdf->WriteHTML($this->fixHTML($this->getBuffer(), $form), true);
             // ALT YAZ
             $pdf->SetFont($dataFont, 'B', $dataFontSize);
             if ($form != -5) {
                 //ekleri yazdırırken alt yazi koymamak için
                 $this->writeAltyazi($pdf, $evrak_id);
             }
             $pdf->SetFont($dataFont, '', $dataFontSize);
             if ($personelCount > 0) {
                 $pdf->AddPage();
                 $pdf->WriteHTML($this->parseTaslak($this->getBuffer(), "ek", "personel_0"), true);
                 for ($i = 0; $i < $personelCount; $i++) {
                     $sec = "";
                     if ($i < $personelCount - 1) {
                         $sec = "personel_" . ($i + 1);
                         $pdf->WriteHTML($this->parseTaslak($this->getBuffer(), "personel_" . $i, $sec), true);
                         $pdf->AddPage();
                     } else {
                         $pdf->WriteHTML($this->parseTaslak($this->getBuffer(), "personel_" . $i, $sec), true);
                     }
                 }
             }
         } else {
             // Taslaklar
//.........这里部分代码省略.........
开发者ID:kaantunc,项目名称:MYK-BOR,代码行数:101,代码来源:pdf_eski.php


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