cheazygoya Posted August 14, 2008 Share Posted August 14, 2008 Hello all, I would like to be able to link to files in a SQL DB that populate an overlib.js popup. Currently, all the information in the DB populates when event icons are moused-over. I need to link to any event in the popup that have documents. Below are code snippets which I believe are related to my problem. Any and all help would be fantastic. Thanks in advance. ------------------------------------------------------------------------ $ini_events = parse_ini_file("events.ini", true); if ($_POST['eventtype']<>'0') { foreach ($ini_events as $inieventkey1) { if ($_POST['eventtype']==$inieventkey1['showname']) { echo "<script>var inieventimagelogo = '".$inieventkey1['imagelogo']."';"."</script>"; echo "<script>var inieventshowname = '".$inieventkey1['showname']."';"."</script>"; break; } } } -------------------------------------------------------------- function showcall(strtext,eventimagelogo,eventshowname) { strhelp = '<div style="z-index: 10">'+strtext+'</div>'; return overlib(strhelp, CAPTION, '<img border=0 src='+eventimagelogo+' valign=bottom> '+eventshowname, DELAY, 0, STICKY, MOUSEOFF, 1000, WIDTH, 200, CLOSETEXT, '<img border=0 src=images/close.gif>', CLOSETITLE, 'Click to Close', CLOSECLICK, FGCLASS, 'olFgClass', CGCLASS, 'olCgClass', BGCLASS, 'olBgClass', TEXTFONTCLASS, 'olFontClass', CAPTIONFONTCLASS, 'olCapFontClass', CLOSEFONTCLASS, 'olCloseFontClass'); } ---------------------------------------------------------------- $j=1; while ($j<=$icolumncounts) { if ($pageview=='month') { $xdate = date("Ym", mktime(0,0,0, $iStartMonth+$j-1, "01", $iYearOfStartingMonth)); } if ($pageview=='day') { $xdate = date("Ymd", mktime(3,0,0, $iStartMonth, str_pad(($iStartDay+$j-1),2,"0",STR_PAD_LEFT), $iYearOfStartingMonth)); } if ($pageview=='week') { $xdate = date("Ymd", mktime(0,0,0, $iStartMonth, str_pad($j,2,"0",STR_PAD_LEFT), $iYearOfStartingMonth)); } echo "<td align=center width=".$w.">"; if ($arrTelCallsDate[0]!='') { $iIndex=0; $calldetails = ""; foreach($arrTelCallsDate as $val) { if (substr($val,0,6)==$xdate && $pageview=='month') { $d = substr($arrTelCallsDate[$iIndex],4,2) . "/" . substr($arrTelCallsDate[$iIndex],6,2) . "/" . substr($arrTelCallsDate[$iIndex],0,4); $calldetails .= "<b>Date:</b> ".$d."<br>".$arrTelCallsDetail[$iIndex]."<br>"; } if (substr($val,0,==$xdate && $pageview=='day') { $d = substr($arrTelCallsDate[$iIndex],4,2)."/". substr($arrTelCallsDate[$iIndex],6,2) . "/" . substr($arrTelCallsDate[$iIndex],0,4); $calldetails .= "<b>Date:</b> ".$d."<br>".$arrTelCallsDetail[$iIndex]."<br>"; } if (substr($val,0,==$xdate && $pageview=='week') { $d = substr($arrTelCallsDate[$iIndex],4,2)."/". substr($arrTelCallsDate[$iIndex],6,2) . "/" . substr($arrTelCallsDate[$iIndex],0,4); $calldetails .= "<b>Date:</b> ".$d."<br>".$arrTelCallsDetail[$iIndex]."<br>"; } $iIndex++; } // Show 1 icon for one month's tele calls if (!empty($calldetails)) { echo "<img src='".$inieventkey['imagelogo']."' align=center onmouseover=\"return showcall('".$calldetails."','".$inieventkey['imagelogo']."','".$inieventkey['showname']."');\" onmouseout='nd(100);'>"; } } echo "</td>\n"; $j++; } echo "<td width=4 bgcolor=white><img src='images/spacerw5.gif'></td>\n"; echo "</tr>\n"; $eventrow++; } [attachment deleted by admin] Link to comment https://forums.phpfreaks.com/topic/119706-linking-help-with-overlib/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.