本文整理汇总了PHP中validCode函数的典型用法代码示例。如果您正苦于以下问题:PHP validCode函数的具体用法?PHP validCode怎么用?PHP validCode使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了validCode函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: validCode
</strong>:</td>
<td align="left" style="padding:3px;"><input name="username" type="text" size="18" class="userpass" maxlength="20"/></td>
</tr>
<tr>
<td align="right" width="40%"><strong><?php
echo $strLoginPassword;
?>
</strong>:</td>
<td align="left" style="padding:3px;"><input name="password" type="password" size="18" maxlength="20" class="userpass"/></td>
</tr>
<?php
if ($settingInfo['uservalid'] == 1) {
if (function_exists('imagecreate')) {
$vcode = "<img src=\"include/image_firefox.inc.php\" alt=\"{$strGuestBookValidImage}\" align=\"middle\"/>";
} else {
$vcode = validCode(6);
$_SESSION['backValidate'] = $vcode;
}
?>
<tr>
<td align="right" width="40%"><strong><?php
echo $strLoginValidate;
?>
</strong>:</td>
<td align="left" style="padding:3px;"><input name="validate" type="text" size="5" class="userpass" maxlength="10"/> <?php
echo $vcode;
?>
</td>
</tr>
<?php
}
示例2: validCode
<td align="right"><strong><?php
echo $strLoginValidate;
?>
:</strong></td>
<td align="left" style="padding:3px;">
<input name="validate" type="text" size="30" class="userpass" maxlength="10"/>
<?php
if (function_exists('imagecreate')) {
?>
<img src="include/image_firefox.inc.php" alt="<?php
echo $strGuestBookValidImage;
?>
" align="middle"/>
<?php
} else {
echo $_SESSION['backValidate'] = validCode(6);
}
?>
<font color="#FF0000">*</font> <?php
echo $strGuestBookInputValid;
?>
</td>
</tr>
<?php
}
?>
<tr><td colspan="2" align="center" style="padding:3px;">
<input name="save" class="userbutton" type="button" id="save" value="<?php
echo $strSave;
?>
" onclick="Javascript:onclick_update(this.form)">
示例3: validCode
</strong></td>
<td width="29%" align="left" style="padding:3px;">
<input name="validate" type="text" size="5" class="userpass" maxlength="10"/>
<?php
if (function_exists(imagecreate)) {
?>
<img src="<?php
echo $validate_image;
?>
" alt="<?php
echo $strGuestBookValidImage;
?>
" align="absmiddle"/>
<?php
} else {
echo validCode(6);
}
?>
</td>
<td width="18%" align="right" style="padding:3px;"><strong>
<?php
echo $strGuestBookOption;
?>
</strong></td>
<td width="35%" align="left" style="padding:3px;">
<label for="label5">
<input name="isSecret" type="checkbox" id="label5" value="1" <?php
echo $_POST['isSecret'] == "1" ? "checked" : "";
?>
/>
示例4: makemusic
function makemusic($fileid)
{
global $strPlayMusic, $strOnlinePlay, $strOnlineStop, $strDownload, $strRightBtnSave;
$kkstr = "";
$arrId = explode("|", $fileid);
$arrType = explode(".", $arrId[0]);
$max = count($arrType) - 1;
$file_type = $arrType[$max];
if (strpos($file_type, "?") > 0) {
$file_type = substr($file_type, 0, strpos($file_type, "?"));
}
$fid = "media" . validCode(4);
$kkstr .= "<div class=\"UBBPanel\">";
$kkstr .= "<div class=\"UBBTitle\"><img src=\"images/music.gif\" alt=\"\" style=\"margin:0px 2px -3px 0px\" border=\"0\"/>{$strPlayMusic} -- " . $arrId[1];
$kkstr .= "</div>";
$kkstr .= "<div class=\"UBBContent\">";
$kkstr .= "<a id=\"" . $fid . "_href\" href=\"javascript:MediaShow('" . $file_type . "','{$fid}','" . $arrId[0] . "','" . $arrId[2] . "','" . $arrId[3] . "','{$strOnlinePlay}','{$strOnlineStop}')\">";
$kkstr .= "<img name=\"" . $fid . "_img\" src=\"images/mm_snd.gif\" style=\"margin:0px 3px -2px 0px\" border=\"0\" alt=\"\"/>";
$kkstr .= "<span id=\"" . $fid . "_text\">{$strOnlinePlay}</span></a><div id=\"" . $fid . "\">";
$kkstr .= "</div></div></div>";
return $kkstr;
}
示例5: upload_file
function upload_file($temp_file, $file_name, $dir, $tmp_name = "")
{
if (empty($tmp_name)) {
$tmp_name = validCode(10);
}
$return = "";
if ($temp_file != "") {
if (check_dir($dir)) {
$type = getFileType($file_name);
if (checkFileType($file_name)) {
$file_path = "{$dir}/{$tmp_name}.{$type}";
//$copy_result=copy($temp_file,"$file_path");
if (@copy($temp_file, $file_path) || function_exists('move_uploaded_file') && @move_uploaded_file($temp_file, $file_path)) {
@unlink($temp_file);
$check_info = true;
}
if (!$check_info && is_readable($temp_file)) {
$attachedfile = readfromfile($temp_file);
$fp = @fopen($file_path, 'wb');
@flock($fp, 2);
if (@fwrite($fp, $attachedfile)) {
@unlink($temp_file);
$check_info = true;
}
@fclose($fp);
}
$return = $check_info ? $tmp_name . "." . $type : "";
}
}
}
return $return;
}