- Fórum WMO
- → DARK_LINK's Content
DARK_LINK's Content
There have been 53 items by DARK_LINK (Search limited from 26/04/2023)
#394562 Erro No Php, Variavel Sendo Um Código...
Posted by DARK_LINK on 30/06/2004, 11:28 in PHP
ah e perguntando outra coisa
como eu faço pra um form executar uma acção, sendo que ele está dentro de um echo??
tipo
<?php if($_REQUEST["login"] == "sucesso") { if(empty($_SESSION["MM_USERNAME"])) { echo("Você precisa logar, e não colocar a variavél login como sucesso..."); } }else{ echo(' <layer name="layer1" pagex="36" pagey="122" z-index="1" width="425" height="123" clip="10,10,10,10" background="imagens/fundo.jpg">'); echo(' <form action="'.$loginFormAction.'" method="POST" name="login_layer" class="style1">'); echo(' <font color="#000000">Nome:</font>'); echo(' <input name="usuario" type="text" id="usuario"><br>'); echo(' <font color="#000000">Senha:</font>'); echo(' <input name="senha" type="password" id="senha"><br>'); echo('<input type="submit" name="Submit" value="Logar">'); echo(' '); echo('</p>'); echo(' </form>'); echo(' </layer>'); } ?>
#394308 Erro No Php, Variavel Sendo Um Código...
Posted by DARK_LINK on 29/06/2004, 22:02 in PHP
Página Principal (index.php)
<?php require_once('Connections/principal.php'); ?> <?php mysql_select_db($database_principal, $principal); $query_Recordset1 = "SELECT codigo,n FROM codigos ORDER BY n ASC"; $Recordset1 = mysql_query($query_Recordset1, $principal) or die(mysql_error()); $row_Recordset1 = mysql_fetch_assoc($Recordset1); $totalRows_Recordset1 = mysql_num_rows($Recordset1); if($row_Recordset1['n'] == 1) { $cod[0] = $row_Recordset1['codigo']; $cod[0]; } if($row_Recordset1['n'] == 2) { if(empty($cod[0])) { }else{ $cod[1] = $row_Recordset1['codigo']; } } if($row_Recordset1['n'] == 3) { if(empty($cod[0])) { }else{ $cod[2] = $row_Recordset1['codigo']; } } ?> <title>RPGZone | Geração Elizar | Games??? É aqui mesmo!!</title><style type="text/css"> <!-- body { background-image: url(imagens/fundo.jpg); } --> </style> <table width="766" border="0" cellpadding="0" cellspacing="0"> <!--DWLayoutTable--> <tr> <td width="17" height="13"></td> <td width="209"></td> <td width="19"></td> <td width="279"></td> <td width="16"></td> <td width="209"></td> <td width="17"></td> </tr> <tr> <td height="106"> </td> <td colspan="3" valign="top" background="imagens/logo.jpg"><!--DWLayoutEmptyCell--> </td> <td> </td> <td rowspan="2" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0" background="imagens/headlines.jpg"> <!--DWLayoutTable--> <tr> <td width="12" height="26"> </td> <td width="183"> </td> <td width="14"> </td> </tr> <tr> <td height="72"> </td> <td valign="top"><?php $cod[1]; ?></td> <td> </td> </tr> <tr> <td height="27"> </td> <td> </td> <td> </td> </tr> </table></td> <td> </td> </tr> <tr> <td height="19"></td> <td></td> <td></td> <td></td> <td></td> <td></td> </tr> <tr> <td height="13"></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> </tr> <tr> <td height="434"></td> <td valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0" background="imagens/m_principal.jpg"> <!--DWLayoutTable--> <tr> <td width="19" height="37"> </td> <td width="167"> </td> <td width="23"> </td> </tr> <tr> <td height="367"> </td> <td valign="top">Conteúdo Principal do menu é aqui! </td> <td> </td> </tr> <tr> <td height="30"> </td> <td> </td> <td> </td> </tr> </table></td> <td> </td> <td valign="top"><table width="261" border="0" cellpadding="0" cellspacing="0"> <!--DWLayoutTable--> <tr> <td width="261" height="61" valign="top" background="imagens/c_cima.jpg"><!--DWLayoutEmptyCell--> </td> </tr> <tr> <td height="326" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0" background="imagens/c_meio.jpg"> <!--DWLayoutTable--> <tr> <td width="30" height="326"> </td> <td width="205" valign="top"><?php $cod[2]; ?></td> <td width="26"> </td> </tr> </table></td> </tr> <tr> <td height="47" valign="top" background="imagens/c_baixo.jpg"><!--DWLayoutEmptyCell--> </td> </tr> </table></td> <td></td> <td valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0" background="imagens/m_segundo.jpg"> <!--DWLayoutTable--> <tr> <td width="15" height="38"> </td> <td width="178"> </td> <td width="16"> </td> </tr> <tr> <td height="367"> </td> <td valign="top">Conteúdo do Menu é Aqui </td> <td> </td> </tr> <tr> <td height="29"> </td> <td> </td> <td> </td> </tr> </table></td> <td></td> </tr> <tr> <td height="16"></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> </tr> <tr> <td height="47"></td> <td colspan="5" valign="top"><!--DWLayoutEmptyCell--> </td> <td></td> </tr> </table> <?php mysql_free_result($Recordset1); ?>arquivo 'Connections/principal.php'
<?php # FileName="Connection_php_mysql.htm" # Type="MYSQL" # HTTP="true" $hostname_principal = "localhost"; $database_principal = "rpgzone"; $username_principal = "root"; $password_principal = ""; $principal = mysql_pconnect($hostname_principal, $username_principal, $password_principal) or trigger_error(mysql_error(),E_USER_ERROR); ?>
Dados do DB:
rpgzone
->codigos
->n
-->n=1
-->codigos
<?php $mzn_path = "e:\\site\\rpgzone\\mznews"; require_once($mzn_path ."/mzn2.php"); $mzn_selfpage = $s->req['PHP_SELF']; $mzn2 = new MZn2_Noticias; $mzn2->categoria = "principal"; ?>e
rpgzone
->codigos
->n
-->n=2
-->codigos
<?php $mzn2->data = $s->req['mzn_data']; $mzn2->usuario = $s->req['mzn_usuario']; $mzn2->busca = $s->req['mzn_busca']; $mzn2->pagina = $s->req['mzn_pg']; $mzn2->porpagina = 0; $mzn2->mostrar_manchetes(); ?>
e
rpgzone
->codigos
->n
-->n=3
-->codigos
<?php $mzn2->data = $s->req['mzn_data']; $mzn2->usuario = $s->req['mzn_usuario']; $mzn2->busca = $s->req['mzn_busca']; $mzn2->pagina = $s->req['mzn_pg']; $mzn2->porpagina = 5; $mzn2->mostrar_noticias(); $mzn2->mostrar_paginacao($mzn_selfpage ."?mzn_pg={pagina}", 1); ?>
eu teria que fazer os comandos que estão gravados em MySQL sejam executados no index.php
alguem pode me ajudar?
#371113 Onde Consigo Os Fontes De Uma Site Em Asp.net
Posted by DARK_LINK on 24/05/2004, 11:58 in .NET
ai vai, é recomendado Visual Studio .NET
http://www.dotnetnuke.com
#370679 Variavel Função Dentro De Um Echo
Posted by DARK_LINK on 23/05/2004, 19:11 in PHP
Eu fiz isso:
PHP |
<?php if(empty($_SESSION["MM_Username"])) { echo(' <form name="login" method="POST" action="<?php echo $loginFormAction; ?>"> <p>Login: <input type="text" name="login"> <br> Senha: <input type="text" name="senha"> </p> <p> <input type="submit" name="Submit" value="Submit"> </p> <p> </p> </form>'); }else{ echo("Você está logado como:".$_SESSION["MM_Username"]); echo('<BR><a href="<?php echo $logoutAction ?>">Clique aqui para sair</a>'); } ?> |
mas tipow as funções $logoutAction , $loginFormAction, como eu faço para ai dentro ele quando clicar por exemplo no "Clique aqui para sair" ele excutar a ação??
aki vai ações:
PHP |
<?php //initialize the session session_start(); // ** Logout the current user. ** $logoutAction = $_SERVER['PHP_SELF']."?doLogout=true"; if ((isset($_SERVER['QUERY_STRING'])) && ($_SERVER['QUERY_STRING'] != "")){ $logoutAction .="&". htmlentities($_SERVER['QUERY_STRING']); } if ((isset($_GET['doLogout'])) &&($_GET['doLogout']=="true")){ //to fully log out a visitor we need to clear the session varialbles session_unregister('MM_Username'); session_unregister('MM_UserGroup'); $logoutGoTo = "index.php"; if ($logoutGoTo) { header("Location: $logoutGoTo"); exit; } } ?> <?php // *** Validate request to login to this site. session_start(); $loginFormAction = $_SERVER['PHP_SELF']; if (isset($accesscheck)) { $GLOBALS['PrevUrl'] = $accesscheck; session_register('PrevUrl'); } if (isset($_POST['login'])) { $loginUsername=$_POST['login']; $password=$_POST['senha']; $MM_fldUserAuthorization = "cargo"; $MM_redirectLoginSuccess = "pagina.php"; $MM_redirectLoginFailed = "restrito.php"; $MM_redirecttoReferrer = false; mysql_select_db($database_rpgzone, $rpgzone); $LoginRS__query=sprintf("SELECT login, senha, cargo FROM logindata WHERE login='%s' AND senha='%s'", get_magic_quotes_gpc() ? $loginUsername : addslashes($loginUsername), get_magic_quotes_gpc() ? $password : addslashes($password)); $LoginRS = mysql_query($LoginRS__query, $rpgzone) or die(mysql_error()); $loginFoundUser = mysql_num_rows($LoginRS); if ($loginFoundUser) { $loginStrGroup = mysql_result($LoginRS,0,'cargo'); //declare two session variables and assign them $GLOBALS['MM_Username'] = $loginUsername; $GLOBALS['MM_UserGroup'] = $loginStrGroup; //register the session variables session_register("MM_Username"); session_register("MM_UserGroup"); if (isset($_SESSION['PrevUrl']) && false) { $MM_redirectLoginSuccess = $_SESSION['PrevUrl']; } header("Location: " . $MM_redirectLoginSuccess ); } else { header("Location: ". $MM_redirectLoginFailed ); } } ?> |
#370629 Asp .net
Posted by DARK_LINK on 23/05/2004, 17:56 in .NET
Attached Files
- mkwebdir.vbs 6.73KB 6 downloads
#370627 Asp .net
Posted by DARK_LINK on 23/05/2004, 17:55 in .NET
'--------------------------------------------------------------------------------------------------- ' This function creates a virtual web directory on the specified web site ' and with the specified path ' 'mkwebdir [--computer|-c COMPUTER1, COMPUTER2, COMPUTER3] ' <--website|-w WEBSITE> ' <--virtualdir|-v NAME1,PATH1,NAME2,PATH2,...> ' [--help|-?] ' 'COMPUTER Computer on which users exists 'WEBSITE1,WEBSITE2 Virtual Web Sites on which directories will be created 'NAME1,PATH1,NAME2,PATH2 Virtual Directories names and paths to create ' 'Example 1 mkwebdir -c MyComputer -w "Default Web Site" ' -v "Virtual Dir1","c:\inetpub\wwwroot\dir1","Virtual Dir2","c:\inetpub\wwwroot\dir2" ' '---------------------------------------------------------------------------------------------------
alguem sabe como eu executo esse script no meu server em ASP .NET?
#359974 Newbie Em Visual C#... Eh Isso Msm...
Posted by DARK_LINK on 08/05/2004, 22:24 in C#
tipow
da uma olhada no ciodigo
Console.Write("Usuário: "); string user = Console.ReadLine(); if(user == "lucas") { Console.Write("Usuário correto"); goto logar; } else { Console.Write("Usuário Incorreto"); goto fim; } Console.Write("Senha: "); string pass = Console.ReadLine(); if(pass == "teske") { Console.Write("Senha Correta!"); goto logar; } else Console.Write("Senha Incorreta!"); goto fim; } fim //preciso definir isso como goto Console.In.Close; logar //preciso definir isso como goto Console.Write("Logado, inciar? (S/N)"); string sn = Console.ReadLine();
#342936 Loop, Num Sistema De Categorias
Posted by DARK_LINK on 16/04/2004, 15:32 in PHP
Nome da categoria
Itens da Categoria
Ai, tipo
no DB tem 2campos
n = Key, Int.. //para a indetificacao
nome = varchar // o nome..
no DB do Menu tem:
n = Key,Int
titulo = Varchar
link = Varchar
categoria = Int
dai, quando eu coloco o comando, ele faz so a primeira categoria...
as outras somem
#342908 Loop, Num Sistema De Categorias
Posted by DARK_LINK on 16/04/2004, 15:09 in PHP
Como eu faco para depois que ele terminar o codigo ele voltar para o comeco do codigo denovo??
Tipow
veja se vc's entendem:
<? echo('<table width="75%" border="1" cellspacing="0" cellpadding="0">'); echo('<tr>'); echo('<td>Menu Principal</td>'); echo('</tr>'); echo('</table>'); mysql_connect('localhost','root',''); mysql_select_db('rpgzone'); $sql = "SELECT * FROM menu2"; $result = mysql_query($sql); $myrow = mysql_fetch_array($result); $sql2 = "SELECT * FROM menu2 ORDER BY n DESC"; $sql3 = "SELECT * FROM categorias ORDER BY n DESC"; $result = mysql_query($sql3); while($myrow = mysql_fetch_array($result)) { $ncat = $myrow["n"]; $sql4 = "SELECT * FROM categorias WHERE n=$ncat"; $result = mysql_query($sql3); while($myrow2 = mysql_fetch_array($result)) { $nome = $myrow2["nome"]; echo('<table width="75%" border="1" cellspacing="0" cellpadding="0">'); echo('<tr>'); echo('<td>'.$nome.'</td>'); echo('</tr>'); $result = mysql_query($sql2); while($myrow3 = mysql_fetch_array($result)) { $titulo = $myrow3["titulo"]; $hot = $myrow3["hot"]; $link = $myrow3["link"]; $catid = $myrow3 ["categoria"]; if($ncat == $catid) { if(empty($texto)) { echo('<table width="75%" border="1" cellspacing="0" cellpadding="0">'); echo('<tr>'); echo('<td><a href="'.$link.'">'.$titulo.'</td>'); echo('</tr>'); $id[1] = '0'; }else{ echo('<table width="75%" border="1" cellspacing="0" cellpadding="0">'); echo('<tr>'); echo('<td>'.$titulo.'</td>'); echo('</tr>'); echo('<tr>'); echo('<td>'.$texto.'</td>'); echo('</tr>'); echo('</table>'); } } } } } if($id[1] == '0') { echo('</table>'); } ?>
#326088 Conexão Ao Odbc, No Asp
Posted by DARK_LINK on 26/03/2004, 21:54 in ASP
[code=auto:0]<%@language=vbscript%>
<!--#include file="config.asp" -->
<%
on error resume next
dim connstr
dim conn
connstr = "Provider=SQLOLEDB;Data Source=muonline;DATABASE=muonline;UID=Administrador;pwd=nsdopc2509"
Set conn = Server.CreateObject("ADODB.Connection")
conn.Open connstr
errormsg="erro......"
if err.number<>0 then
response.write "Erro na Conexão"
response.end
end if
%>CODE]
(OBS: não foi feito por min)
e tipo, naum conecta mas nem ferrando
- Fórum WMO
- → DARK_LINK's Content
- Privacy Policy
- Regras ·