primero que nada es mi primer pregunta, tengo el siguiente codigo
<?php
session_start();
require_once("conexion.php");
$skl="select * from entrevistados where identrevistado=".$_GET["id_entre"]."";
$rs=mysql_query($skl,$con);
while ($rg=mysql_fetch_array($rs))
{
$idraro=$rg["identrevistado"];
$nombre=$rg["nombre"];
$ap=$rg["apellidopaterno"];
$am=$rg["apellidomaterno"];
$area=$rg["area"];
$puesto=$rg["puesto"];
$oficina=$rg["oficina"];
$comentario=$rg["comentario"];
$empresa=$rg["empresa"];
$c1=$rg["c1"];
$terminado=$rg["terminado"];
$entrevista=$rg["entrevista"];
}
if(isset($_SESSION[iniciado])){
}
else{
echo "<script type=>
window.location=index.php;
</script>";
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>CRM ALFA Consulting</title>
<link type="text/css" rel="stylesheet" href="dhtmlgoodies_calendar/dhtmlgoodies_calendar.css?random=20051112" media="screen"></LINK>
<SCRIPT type="text/javascript" src="dhtmlgoodies_calendar/dhtmlgoodies_calendar.js?random=20060118"></script>
<script type="text/javascript" src="JS/validacion.js"></script>
<script language="javascript" type="text/javascript">
function eliminar(id)
{
if (confirm("Realmente desea eliminar el registro?"))
{
window.location="borrar.php?id_user="+id;
}
}
function docu(){
var real;
real=document.form1.area.value;
document.form1.aria.value=real;
var url="docus.php?area_es="
real=real.replace(/ /g,"_");
real=real.URLlimpia();
url=url+real;
//alert(url);
window.open(url,"docs")
}
String.prototype.URLlimpia = function(){
var tmp_this = this.toLowerCase();
var arr_busca = "??".split("");
var arr_reemplaza = "aeiounu".split("");
for(var i=0; i<arr_busca.length; i++ ){
tmp_this = tmp_this.replace(arr_busca[i],arr_reemplaza[i]);
}
return tmp_this.replace(/[^\\s\w]/g,"");
}
function cosa(){
window.location=agrecarcampo.php;
}
function agrega(){
//document.form2.submit();
}
//
//
function checado(){
if(document.form1.c1.checked==true){
document.form1.cuno.value="uno";
}
else{
document.form1.cuno.value="cero";
}
if (document.form1.teminado.checked==true){
document.form1.terminate.value="uno";
}
else{
document.form1.terminate.value="cero";
}
if (document.form1.entrevista.checked==true){
document.form1.entrebista.value="uno";
}
else{
document.form1.entrebista.value="cero";
}
document.form1.submit();
}
function mas(){
var x= parseInt(document.form2.de.value);
var y=parseInt(document.form2.hasta.value);
if(y==0){}
else{
if(x<y){
x=x+1;
document.form2.de.value=x;
}
else{
document.form2.de.value=1;
}
}
}
function menos(){
var x= parseInt(document.form2.de.value);
var y=parseInt(document.form2.hasta.value);
var w=document.dorm2.identrevistado.value;
var url="calculaact.php";
if(y==0){}
else{
if(x==1){
x=y;
document.form2.de.value=x;
}
else{
x=x-1;
document.form2.de.value=x;
url=url+"?identre=" + w +"&idact="x;
window.open(url,"acts");
}
}
}
function maso(){
var c=document.form2.hasta.value;
var c1=parseInt(c);
var c1=c1+1;
document.form2.hasta.value=c1;
window.open("actividad.php?identrevi=<?php echo $idraro ?>","acts")
}
</script>
<style type="text/css">
.encabezado{ background-color:#666666; color:#FFFFFF; font-weight:bold}
.registros{ background-color:#f0f0f0}
</style>
<style type="text/css">
<!--
a:link {text-decoration:none}
a:visited {text-decoration:none}
a:hover{text-decoration:none}
a:active{text-decoration:none}
-->
#red {
float: left;
width: 70%;
height: 95px;
border: 0px solid red;
margin: 0;
}
#blue {
float: left;
width: 30%;
height: 95px;
border: 0px solid blue;
margin: 0;
}
.blanco{color:#FFF;}
</style>
</head>
<body onload="docu()">
<DIV STYLE="position:absolute; top:0px; left:0px; width:100%; height: 95px; background-image: url(imagenes/fondo1.jpg)">
<div id="red">
<font color="#FFFFFF"><h2>"Consulta, Capacita y Crece"</h2></font>
</div>
<div id="blue"><img src="imagenes/logo.gif" width="90" height="90" ALIGN="RIGHT"/></div>
</DIV>
<DIV STYLE="position:absolute; top:95px; left:0px; width:100%">
<center>
<table width="100%" border="1" bgcolor="#999999">
<tr>
<td><a href="main.php" class="blanco">Inicio</a></td>
<td><a href="estadisticas.php" class="blanco">Estadisticas</a></td>
<td><a href="contactos.php" class="blanco">Contactos</a></td>
<td><a href="agenda.php" class="blanco">Agenda</a></td>
<td><a href="iv.php" class="blanco">Instituciones Vinculadas</a></td>
<td><a href="telemarketing.php" class="blanco">Telemarketing</a></td>
<td><a href="formatos.php" class="blanco">Formatos</a></td>
<td><a href="cursos.php" class="blanco">Cursos</a></td>
<td><a href="metas.php" class="blanco">Metas</a></td>
<?php
$sqlantes="select * from usuarios where usuario=".$_SESSION["iniciado"]."";
$resantes=mysql_query($sqlantes,$con);
if ($regantes=mysql_fetch_array($resantes)){
if($regantes["puesto"]==1){
echo"<td><a href=perfiles.php class=blanco>Perfiles</a></td>";
}
}
?>
<td><a href="cuenta.php" class="blanco">Cuenta</a></td>
<td><a href="salir.php" class="blanco">Salir</a></td>
</tr>
</table>
</center>
<center>
<form id="form1" name="form1" method="post" action="modientre.php?identre=<?php echo $_GET["id_entre"]?>">
<?php
?>
<table width="80%" border="1">
<tr>
<td rowspan="4"><img src="imagenes/logo.gif" width="90" height="90" /></td>
<td>Nombre</td><td>Apellido Paterno</td><td>Apellido Materno</td><td>Area</td><td>Puesto</td><td>Oficina</td>
</tr>
<tr>
<td><input name="nombre" type="text" value="<?php echo $nombre?>"/></td><td><input name="app" type="text" value="<?php echo $ap?>"/></td><td><input name="apm" type="text" value="<?php echo $am?>"/></td><td> <select name="area" id="area" onChange="docu()">
<option value="<?php echo $area?>"><?php echo $area?></option>
<?php
$sql="select*from area";
$res=mysql_query($sql,$con);
while ($reg=mysql_fetch_array($res))
{
?>
<option value="<?php echo $reg["area"];?>"><?php echo $reg["area"];?></option>
<?php
}
?>
</select>
<input name="aria" type="hidden" value="" />
</td><td><input name="puesto" type="text" value="<?php echo $puesto?>"/></td><td>
<select name="ofice" id="ofice">
<option value="<?php echo $oficina?>"><?php echo $oficina?></option>
<?php
$sql="select*from oficinas";
$res=mysql_query($sql,$con);
while ($reg=mysql_fetch_array($res))
{
?>
<option value="<?php echo $reg["oficina"] ?>"><?php echo $reg["oficina"] ?> </option>
<?php }?>
</select>
</td>
</tr>
<tr>
<td>Empresa</td><td colspan="5">Comentarios</td>
</tr>
<tr>
<td><input name="empre" type="text" value="<?php echo $empresa?>"/></td><td colspan="5"><input name="comen" type="text" size="60%" value="<?php echo $comentario?>"/></td>
</tr>
</table>
<center>
<?php
if($c1=="cero"){
echo <input name="c1" type="checkbox" value="1" />;
}
else{
echo <input name="c1" type="checkbox" value="1" />;
echo "<script type=>
document.form1.c1.checked=1 ;
</script>";
}
?>
C1 <input name="cuno" type="hidden" value="" />
<input name="teminado" type="checkbox" value="1" />
<?php
if($terminado=="cero"){
}
else{
echo "<script type=>
document.form1.teminado.checked=1 ;
</script>";
}
?>
Terminado <input name="terminate" type="hidden" value="" />
<input name="entrevista" type="checkbox" value="1" />
<?php
if($entrevista=="cero"){}
else{
echo "<script type=>
document.form1.entrevista.checked=1 ;
</script>";
}
?>
Entrevista<input name="entrebista" type="hidden" value="" />
</center>
<input name="" type="button" value="Modificar" onclick="checado()"/>
</form>
<form action="" method="get" name="form2">
<br /><table width="860" border="1">
<tr>
<td rowspan="6" width="30%"><p>Documentos de Area</p>
<p><iframe src="" width="100%" height="500" align="center" id="docs" name="docs"></iframe><br />
</p></td>
<td colspan="2"><center>Actividades</center></td>
</tr>
<tr>
<td colspan="2" rowspan="5"><iframe src="activida.php?identrevi=<?php echo $idraro ?>" width="620" height="550" align="center" id="act" name="acts"></iframe></td>
</tr>
</table>
<input name="actividad" type="hidden" value="1" />
<?php
$c=1;
echo "<script type=>
document.form2.actividad.value=".$c."
</script>";
$asql="select * from actentre where identrevistado=".$idraro."";
$ares=mysql_query($asql,$con);
$xamp=mysql_num_rows($ares);
echo <input name="total" type="hidden" value="" />;
echo "<script type=>
document.form2.total.value=".$xamp.";
</script>";
?>
<input name="de" type="text" disabled="disabled" size="3" value=""/> de <input name="hasta" type="text" size="3" disabled="disabled" value=""/>
<br />
<?php
if ($xamp==0){
echo "<script type=>
document.form2.hasta.value=0;
document.form2.de.value=0;
</script>";
}
else{
echo "<script type=>
document.form2.hasta.value=".$xamp.";
document.form2.de.value=1;
</script>";
}
?>
<input name="identrevistado" type="hidden" value="<?php echo $idraro; ?>" />
<input name="Anterior" type="button" value="Anterior" onclick="menos()"/>
<input name="Siguiente" type="button" value="Siguiente" onclick="mas()"/>
<input name="Sigui" type="button" value="Nueva Actividad" onclick="maso()"/>
<br /><br />
<input name="" type="button" value="Insertar nueva area u oficina" onclick="cosa()" />
</center>
</form>
</DIV>
</body>
</html>
en la funcion menos inserte url=url+"?identre=" + w +"&idact="x;
window.open(url,"acts");
y comense a tener errores, alguien me puede explicar este tipo de errores y su posible solucion porfa porfa, ya lo busque un buen rato y no lo encuentro,
y otro tema, podrian dar un consejo, me encargaron hacer un sistema CRM en 2 sem y media en entorno web y la verdad yo lo veo un mounstruo y no creo acabar, como le puedo hacer para terminar???
de antemano gracias Pertenece a la categoría:
| |