Пример #1
0
						<br/>
						<b>Tipo de post:</b><br/>
						<select name=posttype style="width: 150px">
							<option value="post"<? if(@$post['TYPE']=='post') echo' selected="selected"' ?>>Normal</option>
							<option value="article"<? if(@$post['TYPE']=='article') echo' selected="selected"' ?>>Artigo</option>
						</select><br/>
						<br/>
						<b>publicar?</b> <input type="checkbox" name="publish" value="1"<? if( (isset($post['PUBLISH']) && $post['PUBLISH'] == 1) || !isset($post['PUBLISH']) ) echo' checked="checked"' ?> class="no-css"/><br/>
<? } elseif ($type == 'comments'){ ?>
						<b>Coment&aacute;rio:</b><br/>
						<textarea name="message" rows="10" style="width:430px" onkeypress="countChar(this)"><?php 
echo returnText(@$com['MESSAGE']);
?>
</textarea><br/>
						<?php 
echo ubbCodeButtons('d.postform.message');
?>
						<br/>
						<b>publicar?</b> <input type="checkbox" name="publish" value="1"<? if( (isset($com['PUBLISH']) && $com['PUBLISH'] == 1) || !isset($com['PUBLISH']) ) echo' checked="checked"' ?> class="no-css"/><br/>
<? } elseif ($type == 'links'){ ?>
						<b>T&iacute;tulo:</b><br/>
						<input type="text" size="25" name="urltitle" style="width:430px" value="<?php 
echo returnText(@$link['URLTITLE']);
?>
"/><br/>
						<br/>
						<b>Endere&ccedil;o:</b><br/>
						<input type="text" size="25" name="url" style="width:430px" value="<?php 
echo @$link['URL'];
?>
"/><br/>
Пример #2
0
echo '<b>' . returnHtml($userInfo['NAME']) . '</b> (' . $userInfo['URL'] . ')';
?>
<br/>';
F += '<br/>';
<? }else{ ?>
F += '<input type="hidden" name="userid" value="7"/>';
F += '<b><?php 
echo returnHtml($userInfo['NAME']);
?>
</b><br/>';
F += '<input type="text" name="label" class="w-300" size="25" maxlength="25"><br/>';
<? } ?>
F += '<b>mensagem:</b><br/>';
F += '<textarea name="message" rows="10" class="w-400" onkeypress="countChar(this)"></textarea><br/>';
F += '<?php 
echo ubbCodeButtons('document.sendform' . $id . '.message');
?>
';
F += '<input type="submit" value="comentar" onfocus="blur()"/></form>';
<?
$sql = mysql_query("select * from {$dbPrefix}COMMENTS where POSTID='$id' and PUBLISH='1' order by ID") or $error['mysql'] .= '1.'.mysql_error().'\n]';
$n = 0;

while($rs = mysql_fetch_array($sql)){
	$userid = $rs['USERID'];
	$userSql = mysql_query("select * from {$dbPrefix}USERS where ID='$userid'") or $error['mysql'] .= '2.'.mysql_error().'\n';
	$user = mysql_fetch_array($userSql);

	$alias = ($userid != 7) ? $user['NAME'] : $rs['LABEL'];
	$message = returnHtml($rs['MESSAGE']);
?>