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


PHP getString函数代码示例

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


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


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