tengo este codigo:
Código PHP:
//obtengo la positions, horarios y fechas del talento
$sql="select positions_title as positions, date, start_time, end_time from positions as p
join assigned_positions as ap on p.id_positions=ap.position_id
where ap.talent_id=$talent[talent_id] and ap.event_id=$event[event_id]";
//var_dump($loca);
$result=mysql_query($sql);
while ($tes=mysql_fetch_array($result)){
$positions[]="$tes[positions] ";
$dates[]="$tes[date] ";
$time[]="$tes[start_time] - $tes[end_time] ";
}
$help_ini=substr_count($page[$i], '#HELP-LINK-BEGIN#');
while ($x<=$help_ini){
$x++;
$hlp_inicio[]="<div id=\"mostrarDiv\"><a href=\"#\"><img src=\"../images/info.png\" alt=\"Help$x\"
title=\"help$x\" onclick=\"mostrar('help$x')\"/></a></div>
<div id=\"help$x\" style=\"display:none;\">";
}
$patrones[0] = '/#TALENT-FULL-NAME#/';
$patrones[1] = '/#TALENT-FIRST-NAME#/';
$patrones[2] = '/#EVENT-NAME#/';
$patrones[3] = '/#AGENCY-NAME#/';
$patrones[4] = '/#EVENT-TYPE#/';
$patrones[5] = '/#EVENT-PROGRAM-CODE#/';
$patrones[6] = '/#CLIENT#/';
$patrones[7] = '/#HELP-LINK-BEGIN#/';
$patrones[8] = '/#HELP-LINK-END#/';
$patrones[9] = '/#STORE-NAME#/';
$patrones[10] = '/#STORE-NUMBER#/';
$patrones[11] = '/#STORE-ADDRESS#/';
$patrones[12] = '/#STORE-PHONE#/';
$patrones[13] = '/#POSITION-TITLE#/';
$patrones[14] = '/#TALENT-HOURLY-RATE#/';
//$patrones[15] = '/#TALENT-SPECIAL-PAY#/';
$patrones[16] = '/#EVENT-DATES#/';
$patrones[17] = '/#EVENT-HOURS-AND-SHIFTS#/';
$patrones[18] = '/#EVENT-LOCATION-BEGIN#/';
$patrones[19] = '/#EVENT-LOCATION-END# /';
$patrones[20] = '/ #EID-OR-CLUSTER-NUMBER#/';
$patrones[21] = '/#POSITIONS#/';
/*$patrones[22] = '/#EVENT-LOCATION-PHONE#/';*/
$patrones[23] = '/#AGENT-PHOTO#/';
$patrones[24] = '/#AGENT-NAME#/';
$patrones[25] = '/#AGENT-PHONE#/';
$patrones[26] = '/#AGENT-CELL#/';
$patrones[27] = '/#AGENT-FAX#/';
$patrones[28] = '/#AGENT-EMAIL#/';
$patrones[29] = '/#CLIENT-PHONE#/';
$patrones[30] = '/#CLIENT-EMAIL#/';
$patrones[31] = '/#CLIENT-ADDRESS#/';
$reemplazos[0] = $talent["full_name"];
$reemplazos[1] = $talent["first_name"];
$reemplazos[2] = $event["event_name"];
$reemplazos[3] = $event["client_name"];
$reemplazos[4] = $event["type"];
$reemplazos[5] = $event["epc"];
$reemplazos[6] = $event["client_name"];
$reemplazos[7]= implode("",$hlp_inicio);
$reemplazos[8] = "<br><a href=\"javascript:cerrar('help');return false;\"> <img src=\"../images/close.png\" alt=\"Close Help\"
title=\"close help\"/></a> </div>";
$reemplazos[9] = $store["name"];
$reemplazos[10] = $store["unique_store_number"];
$reemplazos[11] = $store["address"];
$reemplazos[12] = $store["phone"];
$reemplazos[13] = implode(" ",$positions);
$reemplazos[14] = $event["talent_rate"];
/*$reemplazos[15] = $event["client_name"];*/
$reemplazos[16] = implode(" ",$dates);
$reemplazos[17] = implode(" ",$time);
$reemplazos[18] = implode(" ",$loca);
$reemplazos[19] = "";
$reemplazos[20] = implode(" ",$eid);
$reemplazos[21] = implode(" ",$positions);
/*$reemplazos[22] = $event["client_name"];*/
$reemplazos[23] = '<img src="'.$agent["photo"].'"/>';
$reemplazos[24] = $agent["name"];
$reemplazos[25] = $agent["home_phone"];
$reemplazos[26] = $agent["mobil_phone"];
$reemplazos[27] = $agent["office_phone"];
$reemplazos[28] = $agent["email1"];
$reemplazos[29] = $event["client_phone"];
$reemplazos[30] = $talent["email"];
$reemplazos[31] = $talent["client_address"];
echo "</br>page: $j of $k";
//if ($i!=0 and $i==$count){
?>
<div style="background:#FFF none repeat scroll 0%;height:1000px;margin:20px 0pt 0pt 0px;
overflow:auto;position:relative;width:750px; border:1px solid; padding:10px;">
<?php echo preg_replace($patrones, $reemplazos, $page[$i]);
Código PHP:
//obtengo la positions, horarios y fechas del talento
$sql="select positions_title as positions, date, start_time, end_time from positions as p
join assigned_positions as ap on p.id_positions=ap.position_id
where ap.talent_id=$talent[talent_id] and ap.event_id=$event[event_id]";
//var_dump($loca);
$result=mysql_query($sql);
while ($tes=mysql_fetch_array($result)){
$positions[]="$tes[positions] ";
$dates[]="$tes[date] ";
$time[]="$tes[start_time] - $tes[end_time] ";
}
Código PHP:
$reemplazos[16] = implode(" ",$dates);
$reemplazos[17] = implode(" ",$time);
$reemplazos[18] = implode(" ",$loca);
pero cuando creo este array:
Código PHP:
$help_ini=substr_count($page[$i], '#HELP-LINK-BEGIN#');
while ($x<=$help_ini){
$x++;
$hlp_inicio[]="<div id=\"mostrarDiv\"><a href=\"#\"><img src=\"../images/info.png\" alt=\"Help$x\"
title=\"help$x\" onclick=\"mostrar('help$x')\"/></a></div>
<div id=\"help$x\" style=\"display:none;\">";
}
Código PHP:
$reemplazos[7]= implode("",$hlp_inicio);
desde ya muchas gracias