• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP getString函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: getUserAddress

function getUserAddress($paramName, $from) {
        $userAddress = strtolower(getString($paramName, $from));
        if(!preg_match('|^[a-z0-9-]+(\.[a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*$|i', $userAddress)) {
                die("Parameter $paramName is '$userAddress' but should be a valid user address");
        }
	return $userAddress;
}
开发者ID:nethad,项目名称:experiments,代码行数:7,代码来源:index.php


示例2: __construct

 public function __construct($hex)
 {
     $this->primaryA = getString($hex, self::MESSAGE_LENGTH * 0, self::MESSAGE_LENGTH);
     $this->primaryB = getString($hex, self::MESSAGE_LENGTH * 1, self::MESSAGE_LENGTH);
     $this->secondA = getString($hex, self::MESSAGE_LENGTH * 2, self::MESSAGE_LENGTH);
     $this->secondB = getString($hex, self::MESSAGE_LENGTH * 3, self::MESSAGE_LENGTH);
     $this->failA = getString($hex, self::MESSAGE_LENGTH * 4, self::MESSAGE_LENGTH);
     $this->failB = getString($hex, self::MESSAGE_LENGTH * 5, self::MESSAGE_LENGTH);
 }
开发者ID:pmoitech,项目名称:pyrite,代码行数:9,代码来源:GoalMessages.php


示例3: drawJumpToStaff

function drawJumpToStaff($selectedID = false)
{
    global $page;
    $nullable = $selectedID === false;
    $return = drawPanel(getString('jump_to') . ' ' . drawSelectUser('', $selectedID, $nullable, 0, true, true, 'Staff Member:'));
    if ($page['is_admin'] && db_grab('SELECT COUNT(*) FROM users_requests WHERE is_active = 1')) {
        $return = drawMessage('There are pending <a href="requests.php">account requests</a> for you to review.') . $return;
    }
    return $return;
}
开发者ID:Rhenan,项目名称:intranet-1,代码行数:10,代码来源:include.php


示例4: login

 private function login()
 {
     $Auth = new cAuthentication();
     /// unsuccessful login proces ///
     if (!$Auth->login($_POST['login'], $_POST['password_hmac'], $_POST['challenge'])) {
         $this->aErrors[] = getString("Přihlášení se nezdařilo!", 'login');
         foreach ($Auth->getErrors() as $error) {
             $this->aErrors[] = $error;
         }
         $this->db->delete('core_challenges', array('id', '=', $_POST['challenge']));
     }
 }
开发者ID:kieswetter,项目名称:awete-fakturyonline,代码行数:12,代码来源:login.php


示例5: __initialize

 function __initialize($message, $type = 'highlight')
 {
     parent::__initialize('div');
     $this->class = "ui-widget ui-message";
     if (function_exists('translation_string_exists') && translation_string_exists($message)) {
         $message = getString($message);
     }
     $icon = $type == 'highlight' ? 'info' : 'alert';
     $sub = $this->content(new Control('div'));
     $sub->class = "ui-state-{$type} ui-corner-all";
     $sub->content("<span class='ui-icon ui-icon-close' onclick=\"\$(this).parent().parent().slideUp('fast', function(){ \$(this).remove(); })\"></span>");
     $sub->content("<p><span class='ui-icon ui-icon-{$icon}'></span>{$message}</p>");
 }
开发者ID:Naveenr9,项目名称:WebFramework,代码行数:13,代码来源:uimessage.class.php


示例6: fileSearch

function fileSearch()
{
    $wheres = array();
    //input
    if ($_POST['filename'] != "") {
        $filenameValue = $_POST['filename'];
        $filenameQuery = "name LIKE '%" . $filenameValue . "%'";
        array_push($wheres, $filenameQuery);
    }
    if ($_POST['startDate'] != "") {
        $startDateValue = strtotime($_POST['startDate']);
        $startDateQuery = "timestamp > '" . $startDateValue . "'";
        array_push($wheres, $startDateQuery);
    }
    if ($_POST['endDate'] != "") {
        $endDateValue = strtotime($_POST['endDate']);
        $endDateQuery = "timestamp < '" . $endDateValue . "'";
        array_push($wheres, $endDateQuery);
    }
    if (isset($_POST['uploader'])) {
        $uploaders = $_POST['uploader'];
        $uploaderArray = "(";
        for ($i = 0; $i < count($uploaders); $i++) {
            $uploaderArray .= $uploaders[$i] . ',';
        }
        $uploaderArray = substr($uploaderArray, 0, -1) . ')';
        $uploaderQuery = "uploader IN " . $uploaderArray;
        array_push($wheres, $uploaderQuery);
    }
    //create query
    $searchQuery = "SELECT *, file.id AS fileId FROM file, user WHERE file.uploader = user.id";
    for ($i = 0; $i < count($wheres); $i++) {
        $searchQuery .= " AND " . $wheres[$i];
    }
    $searchQuery .= " ORDER BY file.id DESC";
    $filesQuery = getQuery($searchQuery);
    $stringOfFiles = "";
    while ($row = mysqli_fetch_assoc($filesQuery)) {
        $uploader = $row['uploader'];
        $name = $row['display_name'];
        $timestamp = $row['timestamp'];
        $date = date('d.m.Y H:i', $timestamp);
        $filename = $row['name'];
        $stringOfFiles .= getImageTags($filename) . '<a href="download.php?id=' . $row['fileId'] . '" target="_blank">' . $row['name'] . ' ' . getString("uploadedBy") . ' ' . $name . ' ' . $date . '</a>' . ' ' . '<a href="#" onClick= "shareFile(' . $row['fileId'] . ')">' . getString("shareFile") . '</a><br>';
    }
    return $stringOfFiles;
}
开发者ID:perrr,项目名称:svada,代码行数:47,代码来源:files.php


示例7: drawEventForm

function drawEventForm()
{
    global $page;
    $f = new form('cal_events', @$_GET['id'], $page['title']);
    if (url_id()) {
        $f->set_title_prefix(drawHeader(false, ' '));
    }
    if ($page['is_admin']) {
        $f->set_field(array('name' => 'created_user', 'class' => 'admin', 'type' => 'select', 'sql' => 'SELECT id, CONCAT_WS(", ", lastname, firstname) FROM users WHERE is_active = 1 ORDER BY lastname, firstname', 'default' => $_SESSION['user_id'], 'required' => true, 'label' => getString('posted_by')));
    }
    $f->set_field(array('name' => 'title' . langExt(), 'label' => getString('title'), 'type' => 'text'));
    $f->set_field(array('name' => 'start_date', 'label' => getString('start_date'), 'type' => 'datetime', 'required' => true));
    $f->set_field(array('name' => 'end_date', 'label' => getString('end_date'), 'type' => 'datetime', 'required' => true));
    $f->set_field(array('name' => 'type_id', 'type' => 'select', 'sql' => 'SELECT id, description' . langExt() . ' FROM cal_events_types ORDER BY description', 'label' => getString('category'), 'required' => 'true'));
    $f->set_field(array('name' => 'description' . langExt(), 'label' => getString('description'), 'type' => 'textarea', 'class' => 'tinymce'));
    langUnsetFields($f, 'title,description');
    formAddChannels($f, 'cal_events', 'event_id');
    $f->set_order('created_user,title, start_date, end_date, type_id, description, channels');
    langTranslateCheckbox($f, url_id());
    return $f->draw(false, false);
}
开发者ID:Rhenan,项目名称:intranet-1,代码行数:21,代码来源:include.php


示例8: PreRender

 /**
  * @override
  */
 public function PreRender($args = array())
 {
     if (isset($this->Options['captionEl'])) {
         $title = isset($this->Options['captionTitle']) ? $this->Options['captionTitle'] . ": " : getString("TXT_RATING") . ": ";
         $labTitle = new Label($title);
         $labTitle->class = "userrating";
         $caption_element = "<span id='" . $this->Options['captionEl'] . "'></span>";
         $caption = ", captionEl: \$('#" . $this->Options['captionEl'] . "')}";
         unset($this->Options['captionEl']);
         unset($this->Options['captionTitle']);
         $this->Options = system_to_json($this->Options);
         $this->Options = str_replace("}", $caption, $this->Options);
         $this->content($labTitle);
         $this->content($this->CreateSelect($this->id . "_select"));
         //$this->_content[] = "&nbsp;&nbsp;(".$caption_element.")";
     } else {
         $this->Options = system_to_json($this->Options);
         $this->content($this->CreateSelect($this->id . "_select"));
     }
     $script = "\$('#{$this->id}').stars({$this->Options});";
     $this->script($script);
     parent::PreRender($args);
 }
开发者ID:Naveenr9,项目名称:WebFramework,代码行数:26,代码来源:uistarselect.class.php


示例9: __construct

 public function __construct($byteString)
 {
     $this->platformID = getShort($byteString, self::HEADER_START);
     $this->flightGroupCount = getShort($byteString, self::HEADER_FG);
     $this->messageCount = getShort($byteString, self::HEADER_MSG);
     for ($i = 0; $i < self::IFF_COUNT; $i++) {
         $this->IFFNames[] = getString($byteString, self::HEADER_IFF + $i * self::IFF_LENGTH, self::IFF_LENGTH);
     }
     for ($r = 0; $r < self::REGION_COUNT; $r++) {
         $this->regionNames[] = getString($byteString, self::HEADER_REGION + $r * self::REGION_LENGTH, self::REGION_LENGTH);
     }
     for ($c = 0; $c < self::CARGO_COUNT; $c++) {
         $this->globalCargos[] = new GlobalCargo(substr($byteString, self::HEADER_CARGO + $c * GlobalCargo::LENGTH, GlobalCargo::LENGTH));
     }
     for ($g = 0; $g < self::GG_COUNT; $g++) {
         $this->globalGroupNames[] = getString($byteString, self::HEADER_GG + $g * self::GG_LENGTH, self::GG_LENGTH);
     }
     $this->hangar = getByte($byteString, self::HEADER_HANGAR);
     $this->timeLimitMinutes = getByte($byteString, self::HEADER_TIME);
     $this->endMissionWhenComplete = getBool($byteString, self::HEADER_END);
     $this->briefingOfficer = getByte($byteString, self::HEADER_OFFICER);
     $this->briefingLogo = getByte($byteString, self::HEADER_LOGO);
     $this->hex = \Hex::hexToStr($byteString);
 }
开发者ID:pmoitech,项目名称:pyrite,代码行数:24,代码来源:Header.php


示例10: db_table

<?php

include "../../include.php";
if (url_id('module_id')) {
    $result = db_table('SELECT p.id, p.title, p.url, p.is_hidden FROM pages p WHERE module_id = ' . $_GET['module_id'] . ' ORDER BY p.precedence');
} elseif (url_id('modulette_id')) {
    $result = db_table('SELECT p.id, p.title, p.url, p.is_hidden FROM pages p WHERE modulette_id = ' . $_GET['modulette_id'] . ' ORDER BY p.precedence');
} else {
    url_change('./');
}
echo drawTop();
//pages list
$t = new table('pages', drawHeader());
$t->set_column('is_hidden', 'd', '&nbsp;');
$t->set_column('draggy', 'd', '&nbsp;');
$t->set_column('title', 'l', getString('title'));
$t->set_column('url');
$t->set_draggable('draggy');
foreach ($result as &$r) {
    $r['is_hidden'] = draw_form_checkbox('foo', !$r['is_hidden'], false, 'ajax_set(\'pages\', \'is_hidden\', ' . $r['id'] . ', ' . abs($r['is_hidden'] - 1) . ');');
    $r['draggy'] = draw_img('/images/icons/move.png');
    $r['title'] = draw_link('page.php?id=' . $r['id'], $r['title']);
    if (empty($r['url'])) {
        $r['url'] = 'index.php';
    }
}
echo $t->draw($result, 'No pages');
echo drawBottom();
开发者ID:Rhenan,项目名称:intranet-1,代码行数:28,代码来源:pages.php


示例11: langTranslateCheckbox

function langTranslateCheckbox($form, $show = true)
{
    if (!getOption('languages')) {
        return false;
    }
    $form->set_field(array('name' => 'translations_do', 'type' => $show ? 'checkbox' : 'hidden', 'label' => getString('translations_do'), 'value' => 0));
}
开发者ID:Rhenan,项目名称:intranet-1,代码行数:7,代码来源:include.php


示例12: mysqli_fetch_array

            $row = mysqli_fetch_array($result);
            if ($row[0] >= 5) {
                echo getString($lang, "many_votes");
            } else {
                //Exei kato apo 5 psifoys to teleytaio pentalept, opote katametroyme thn psifo.
                $query = "INSERT INTO `psifoi` (`id_theshs`, `id_tragoydioy`, `mytimestamp`) VALUES ({$thesh}, {$id}, CURRENT_TIMESTAMP);";
                //echo $query;
                $result = mysqli_query($con, $query);
                if (!$result) {
                    echo getString($lang, "vtnok");
                } else {
                    echo getString($lang, "vtok");
                }
            }
        } else {
            //Kapoio lathos ths mysql
            echo getString($lang, "vtnok");
        }
    } else {
        //Den yparxei to tragoydi.
        echo getString($lang, "vtnok");
    }
    mysqli_close($con);
    echo "</li>";
    echo "</ul>";
    echo "<a class=\"button\" href=\"music_list.php?lang={$lang}&thesh={$thesh}&pass={$pass}\" >" . getString($lang, "bk") . "</a>";
}
?>

 </body>
</html>
开发者ID:ellak-monades-aristeias,项目名称:mult_bus,代码行数:31,代码来源:music_vote.php


示例13: getString

<div>
	<div id="login_js_missing" class="error"><?php 
print getString('Pro přihlášení je vyžadován zapnutý Javascript!', 'login');
?>
</div>
	<?php 
if ($login->errors) {
    ?>
		<?php 
    foreach ($login->errors as $err) {
        ?>
			<div class="error"><?php 
        print $err;
        ?>
</div>
		<?php 
    }
    ?>
	<?php 
}
?>
	
	<?php 
if (isset($login->challenge)) {
    ?>
		<form action="<?php 
    print $login->href;
    ?>
" name="form_authentication" id="form_authentication" method="post" >
		<fieldset>
		<input type="hidden" name="challenge" value="<?php 
开发者ID:kieswetter,项目名称:awete-fakturyonline,代码行数:31,代码来源:login.tpl.php


示例14: format_post_bits

<?php

include '../../include.php';
if ($posting) {
    format_post_bits('is_selected');
    langTranslatePost('name,description');
    $id = db_save('soc_members');
    url_change_post('../');
}
echo drawTop();
$f = new form('soc_members', @$_GET['id'], $page['title']);
$f->set_field(array('name' => 'name' . langExt(), 'type' => 'text', 'label' => getString('title')));
$f->set_field(array('name' => 'country_id', 'type' => 'select', 'sql' => 'SELECT id, en FROM jr_countries ORDER BY en'));
$f->set_field(array('name' => 'description' . langExt(), 'type' => 'textarea', 'class' => 'tinymce', 'label' => getString('description')));
langUnsetFields($f, 'name,description');
langTranslateCheckbox($f);
$f->set_title_prefix($page['breadcrumbs']);
echo $f->draw();
echo drawBottom();
开发者ID:Rhenan,项目名称:intranet-1,代码行数:19,代码来源:edit.php


示例15: getJsString

/**
 * @shortcut for <getString> but ensuring that it is escaped for use in JS
 */
function getJsString($constant, $arreplace = null, $unbuffered = false, $encoding = null)
{
    $res = getString($constant, $arreplace, $unbuffered, $encoding);
    return substr(json_encode($res), 1, -1);
}
开发者ID:rtoi,项目名称:WebFramework,代码行数:8,代码来源:translation.php


示例16: showSetting

function showSetting($row, $enabled)
{
    if ($row['settingstype'] == "boolean") {
        td_open(1);
        if ($row['value'] == "true") {
            form_checkbox("setting", $enabled, true);
        } else {
            form_checkbox("setting", $enabled, false);
        }
        td_close();
        td_open(1);
        echo getString("settings_boolean", "Boolsk");
        td_close();
    } else {
        if ($row['settingstype'] == "integer") {
            td_open(1);
            form_textfield("setting", $row['value'], $enabled);
            td_close();
            td_open(1);
            echo getString("settings_integer", "Heltall");
            td_close();
        } else {
            if ($row['settingstype'] == "string") {
                td_open(1);
                form_textfield("setting", $row['value'], $enabled);
                td_close();
                td_open(1);
                echo getString("settings_string", "Tekst");
                td_close();
            } else {
                td_open(1);
                echo $row['value'];
                td_close();
                td_open(1);
                echo getString("settings_unknown_type", "Ukjent datatype");
                td_close();
            }
        }
    }
}
开发者ID:arewold,项目名称:calcuttagutta,代码行数:40,代码来源:settingsGUI.php


示例17: getString

							</div>
						</div>
						<div class="tab" id="tab-files">
							<div class="tab-back" onclick="changeTab('chat', false)"><span class="glyphicon glyphicon-arrow-left"></span> <?php 
echo getString('back');
?>
</div>
							<div class="tab-content">
								<?php 
include 'pages/files.php';
?>
							</div>
						</div>
						<div class="tab" id="tab-search">
							<div class="tab-back" onclick="changeTab('chat', false)"><span class="glyphicon glyphicon-arrow-left"></span> <?php 
echo getString('back');
?>
</div>
							<div class="tab-content">
								<?php 
include 'pages/searchresults.php';
?>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
		
		<!-- Scripts -->
		<script src="js/plugins/jquery.min.js"></script>
开发者ID:perrr,项目名称:svada,代码行数:31,代码来源:chat.php


示例18: getString

echo getString("logInSvada");
?>
</h3></div>
				  <div class="panel-body">
				  
					<form action="" method="post">
						<div class="form-group">
							<label for="username"><?php 
echo getString("username");
?>
</label>
							<input type="text" name="username" class="form-control" id="username" autofocus>
						</div>
						<div class="form-group">
							<label for="password"><?php 
echo getString("password");
?>
</label>
							<input type="password" name="password" class="form-control" id="password">
						</div>
						<div class="form-group">
						<?php 
echo $message;
?>
</span>
						</div>
						<input type="submit" class="btn btn-primary btn-block" value="Log in">
					</form>
				  </div>
			</div>
		</div>
开发者ID:perrr,项目名称:svada,代码行数:31,代码来源:index.php


示例19: module_polladmin

function module_polladmin()
{
    // adminpage, stop here if not logged in/right access-level
    if (!isValidAdmin()) {
        echo getString("not_valid_admin", "Administratorside, du må logge inn for å få tilgang her");
        return;
    }
    echo '<a href="http://localhost/avisCMS/index.php?m_c=module_polladmin&page_title=Polladmin">Tilbake til oversikt</a>';
    $pollaction = $_REQUEST['pollaction'];
    if ($pollaction == 'addpoll') {
        if (strlen($_REQUEST['polltitle']) < 1) {
            echo "Husk tittel.";
            return;
        }
        echo '<div class="default_header">Avstemning opprettet.</div>';
        $query = "INSERT INTO poll SET title='" . $_REQUEST['polltitle'] . "';";
        $result = DB_insert($query);
        if ($result) {
            echo '<a href="index.php?m_c=module_polladmin&amp;pollaction=editpoll&amp;pollid=' . mysql_insert_id() . '">Rediger den nye pollen</a>';
        } else {
            echo "Feilmelding: " . mysql_error();
        }
    } else {
        if ($pollaction == 'delpoll') {
            $confirm = $_REQUEST['dc'];
            $pollid = $_REQUEST['pollid'];
            if ($confirm == "yes") {
                $query = "DELETE FROM poll WHERE pollid = " . $pollid . ";";
                $result = DB_update($query);
                $num_results += DB_rows_affected($query);
                $query = "DELETE FROM pollquestion WHERE pollid = " . $pollid . ";";
                $result = DB_update($query);
                $num_results += DB_rows_affected($query);
                $query = "DELETE FROM vote WHERE pollid = " . $pollid . ";";
                $result = DB_update($query);
                $num_results += DB_rows_affected($query);
                if ($num_results < 1) {
                    echo "<br/>Ingenting slettet - feilmelding: " . mysql_error();
                } else {
                    echo "<br/>Avstemningen med tilhørende stemmer og det hele aldeles pulverisert.";
                }
            } else {
                echo "<br/><br/>Sikker på at du vil slette avstemning med id " . $pollid . "? Dette medfører også sletting av alle tilknyttede spørsmål og avlagte stemmer!!<br/>";
                echo '<a href="index.php?m_c=module_polladmin&amp;pollaction=delpoll&amp;dc=yes&amp;pollid=' . $pollid . '">Ja!</a>';
            }
        } else {
            if ($pollaction == 'editpoll') {
                $pollaction2 = $_REQUEST['pollaction2'];
                $pollid = $_REQUEST['pollid'];
                $question = $_REQUEST['question'];
                $description = $_REQUEST['description'];
                if ($pollaction2 == "changetime") {
                    $query = "UPDATE poll SET description = '" . $description . "', time_opened='" . $_REQUEST['time_opened'] . "', time_closed='" . $_REQUEST['time_closed'] . "' WHERE pollid=" . $pollid . ";";
                    DB_update($query);
                    if (!result) {
                        echo 'mysql_error()';
                    }
                }
                if ($pollaction2 == "delquestion") {
                    $altid = $_REQUEST['altid'];
                    $query = "DELETE FROM pollquestion WHERE questionid=" . $altid . " AND pollid=" . $pollid . ";";
                    $result = DB_update($query);
                    //echo $query;
                    if (!$result) {
                        echo mysql_error();
                    }
                }
                if ($pollaction2 == 'addquestion') {
                    $querymax = "SELECT MAX(questionid) as maxid FROM pollquestion;";
                    $row = DB_search($querymax);
                    $newid = $row['maxid'] + 1;
                    $query = "INSERT INTO pollquestion SET pollid=" . $pollid . ", questionid='" . $newid . "', question='" . $question . "';";
                    //echo $query;
                    $result = DB_insert($query);
                    if (!result) {
                        echo mysql_error();
                    }
                }
                $pollid = $_REQUEST['pollid'];
                $query = "SELECT * FROM poll WHERE pollid=" . $pollid . ";";
                $row = DB_search($query);
                $query_questions = "SELECT * FROM pollquestion WHERE pollid=" . $pollid . ";";
                $result = DB_get_table($query_questions);
                $pollid = $row['pollid'];
                echo '<table class="default_table">';
                echo '<tr><td colspan=2><div class="default_header">Rediger spørreundersøkelse</div></td></tr>';
                echo "<tr><td>Tittel</td><td>" . $row['title'] . "</td></tr>";
                form_start_post();
                form_hidden("pollid", $pollid);
                form_hidden("m_c", "module_polladmin");
                form_hidden("pollaction", "editpoll");
                form_hidden("pollaction2", "changetime");
                echo "<tr><td>Beskrivelse (300 tegn)</td><td>" . $row['description'] . "</td><td>";
                form_textarea("description", $row['description'], 10, 10);
                echo "</td></tr>";
                echo "<tr><td>Dato start</td><td>" . $row['time_opened'] . "</td><td>";
                form_textfield("time_opened", $row['time_opened']);
                echo "</td></tr>";
                echo "<tr><td>Date slutt</td><td>" . $row['time_closed'] . "</td><td>";
                form_textfield("time_closed", $row['time_closed']);
//.........这里部分代码省略.........
开发者ID:arewold,项目名称:calcuttagutta,代码行数:101,代码来源:mod_poll.php


示例20: date

<?php

require "inc.php";
$path_upload = ROOT_PATH . "/" . $setting['path']['upload'] . date("/Y/m/d/");
$script = "";
set_time_limit(0);
$upload = $mystep->getInstance("MyUploader", $path_upload, true);
$upload->DoIt(false);
$watermark = $setting['watermark']['mode'] & 2 ? 1 : 0;
if ($upload->upload_result[0]['error'] == 0) {
    $upload->upload_result[0]['name'] = getString(urldecode($upload->upload_result[0]['name']));
    $ext = strtolower(strrchr($upload->upload_result[0]['name'], "."));
    $name = str_replace($ext, "", $upload->upload_result[0]['name']);
    $upload->upload_result[0]['name'] = substrPro($name, 0, 80) . $ext;
    $ext = str_replace(".", "", $ext);
    $upload->upload_result[0]['new_name'] = str_replace(".upload", "", $upload->upload_result[0]['new_name']);
    $db->insert($setting['db']['pre'] . "attachment", array(0, 0, 0, $upload->upload_result[0]['name'], $upload->upload_result[0]['type'], $upload->upload_result[0]['size'], '', substr($upload->upload_result[0]['new_name'], 0, 13), 0, '', $req->getSession('username'), $watermark));
    $new_id = $db->GetInsertId();
    if ($new_id != 0) {
        $upload->upload_result[0]['att_id'] = $new_id;
        if (strpos($upload->upload_result[0]['type'], "image") === 0) {
            $upload->MakeDir("{$path_upload}/preview/");
            $img_info = GetImageSize("{$path_upload}/" . $upload->upload_result[0]['new_name']);
            $the_width = $img_info[0];
            $the_height = $img_info[1];
            $zoom = 400;
            if ($the_width > $zoom) {
                $the_height *= $zoom / $the_width;
                $the_width = (int) $zoom;
                img_thumb($path_upload . "/" . $upload->upload_result[0]['new_name'], $the_width, $the_height, $path_upload . "/preview/" . $upload->upload_result[0]['new_name']);
            } else {
开发者ID:laiello,项目名称:mystep-cms,代码行数:31,代码来源:upload.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP getStringFromRequest函数代码示例发布时间:2022-05-15
下一篇:
PHP getStrCut函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap