Jump to content

phpbeginner

Members
  • Posts

    214
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

phpbeginner's Achievements

Member

Member (2/5)

0

Reputation

  1. I currently have a file management system using Zend framework. Everything has been working great with .pdf files in the 2-4 MB range (both on upload and download). There was a .pdf file that was about 7MB in size, which uploaded fine. When selecting the file to download, it completes in about 2 seconds and only downloads about 300KB. I checked on the server and the file actually did upload fine and was not corrupted BUT I cannot get beyond this file download issue. All other files (in 2-4 MB range) seem to download fine. Would it be a memory size issue? Would anyone know the issue or how I can correct? Thanks so much in advance
  2. <SCRIPT LANGUAGE="JavaScript"> <!-- Begin function popUp(URL,URL2) { day = new Date(); id = day.getTime(); eval("page" + id + " = window.open(URL,'" + id + "', 'toolbar=0,scrollbars=1,location=0,top=10,left=10,statusbar=0,menubar=0,resizable=0,width=408,height=400');"); day = new Date(); id = day.getTime(); eval("page" + id + " = window.open(URL2,'" + id + "', 'toolbar=0,scrollbars=1,location=0,top=10,left=450,statusbar=0,menubar=0,resizable=0,width=408,height=400');"); } // End --> </script> I have a map which shows sales people by location and if more then one sales person exists then I would need 2 pop up windows. This works great other than the fact that the areas with one sales person are getting a blank 2nd popup as a second salesperson does not exist. Any help would be appreciated. Thanks In Advance
  3. anyone know what I can do with the code to get the remainder of navigation items to display after the first drop down? Something in my code is hitting the first sub-navigation menu item, then not getting the remainder of the main menu items.......script ends after first Main Menu item with a drop down.
  4. Corrected issue, same problem............ <ul id="menu"> <?php $clsnm="active"; if (isset($_GET["id"])) $clsnm="footerlink"; if (strstr($_SERVER['SCRIPT_NAME'],'events.php')) $clsnm="footerlink"; if (strstr($_SERVER['SCRIPT_NAME'],'gallery.php')) $clsnm="footerlink"; if (strstr($_SERVER['SCRIPT_NAME'],'news.php')) $clsnm="footerlink"; ?> <li class="<?php echo $clsnm;?>"><a href="index.php">Home</a></li> <li class="seplie"></li> <?php $sql = "SELECT id,title,links FROM tblmain where id > 1 and head='Yes' order by sorder asc"; $reccount=$sq->numsrow($sql); if ($reccount > 0) { $ata =$sq->query($sql); while($rs=$sq->fetch($ata)) { $clsnm="footerlink"; $phppgname=$rs["links"]; if ((isset($_GET["id"])) && ($_GET["id"]==$rs["id"])) $clsnm="active"; if ($phppgname!="") { if (strstr($_SERVER['SCRIPT_NAME'],$phppgname)) $clsnm="active"; } if ($rs["links"]=="") $phppgname="contents.php?id=".$rs["id"]; ?> <li class='<?php echo $clsnm;?>'><a href='<?php echo $phppgname;?>'><?php echo $rs['title'];?></a> <?php if (isset($_GET["id"])); $sql = "SELECT id,title,subpageid FROM tblsubpage where subpageid=".$rs["id"]." order by id desc "; $reccount=$sq->numsrow($sql); if ($reccount > 0){ echo("<ul>"); $ata =$sq->query($sql); while($rs=$sq->fetch($ata)) { ?> <li><a href="subcontents.php?id=<?php echo $rs["subpageid"];?>&sid=<?php echo $rs["id"];?>"><?php echo $rs["title"];?></a></li> <?php } echo("</ul>"); } echo("<li class='seplie'></li>"); $pn++; } } ?> </ul>
  5. White_Lily, the issue is not creating the drop down. I have tested this one (jQuery) and it works fine in all browsers using standard coding techniques. I am having trouble with the PHP/MySQL coding I am using. I can create a standard horizontal menu and even get it working til the first drop down menu, once it gets to the first drop down menu and it actually works, it stops display the other main menu items beyond that in the horizontal display. As an example, in my test menu I have Home, About Us, Services, and Contact. I have 2 drop down items on services and once it gets there, then Contact menu item does not display. I am doing something wrong in my code below. ///Where main menu starts/// <ul id="menu"> <?php $clsnm="active"; if (isset($_GET["id"])) $clsnm="footerlink"; if (strstr($_SERVER['SCRIPT_NAME'],'events.php')) $clsnm="footerlink"; if (strstr($_SERVER['SCRIPT_NAME'],'gallery.php')) $clsnm="footerlink"; if (strstr($_SERVER['SCRIPT_NAME'],'news.php')) $clsnm="footerlink"; ?> <li class="<?php echo $clsnm;?>"><a href="index.php">Home</a></li> <li class="seplie"></li> <?php $sql = "SELECT id,title,links FROM tblmain where id > 1 and head='Yes' order by sorder asc"; $reccount=$sq->numsrow($sql); if ($reccount > 0) { $ata =$sq->query($sql); while($rs=$sq->fetch($ata)) { $clsnm="footerlink"; $phppgname=$rs["links"]; if ((isset($_GET["id"])) && ($_GET["id"]==$rs["id"])) $clsnm="active"; if ($phppgname!="") { if (strstr($_SERVER['SCRIPT_NAME'],$phppgname)) $clsnm="active"; } if ($rs["links"]=="") $phppgname="contents.php?id=".$rs["id"]; ?> /// Main menu items/// <li class='<?php echo $clsnm;?>'><a href='<?php echo $phppgname;?>'><?php echo $rs['title'];?></a> ///Sub Menu Items Start///<? php $pnds=1; if (isset($_GET["id"])) $pnds=$_GET["id"]; $sql = "SELECT id,title,subpageid FROM tblsubpage where subpageid=".$rs["id"]." order by id desc "; $reccount=$sq->numsrow($sql); if ($reccount > 0){ echo("<ul>"); $ata =$sq->query($sql); while($rs=$sq->fetch($ata)) { ?> ///Sub Menu Items Display/// <li><a href="subcontents.php?id=<?php echo $rs["subpageid"];?>&sid=<?php echo $rs["id"];?>"><?php echo $rs["title"];?></a></li> <?php } echo("</ul>"); } echo("<li class='seplie'></li>"); ///Sub Menu Ends/// $ pn++; } } ?> ///Main Menu Ends </ul>
  6. It's a navigation menu. Right now I have this and it works until it gets to first drop down menu....... (ie: shows Home, About Us, Services) under services it drops down as it should to show sub-categories. Then it stops and does not display any more Main Menu items after Services. <ul id="menu"> <?php $clsnm="active"; if (isset($_GET["id"])) $clsnm="footerlink"; if (strstr($_SERVER['SCRIPT_NAME'],'events.php')) $clsnm="footerlink"; if (strstr($_SERVER['SCRIPT_NAME'],'gallery.php')) $clsnm="footerlink"; if (strstr($_SERVER['SCRIPT_NAME'],'news.php')) $clsnm="footerlink"; ?> <li class="<?php echo $clsnm;?>"><a href="index.php">Home</a></li> <li class="seplie"></li> <?php $sql = "SELECT id,title,links FROM tblmain where id > 1 and head='Yes' order by sorder asc"; $reccount=$sq->numsrow($sql); if ($reccount > 0) { $ata =$sq->query($sql); while($rs=$sq->fetch($ata)) { $clsnm="footerlink"; $phppgname=$rs["links"]; if ((isset($_GET["id"])) && ($_GET["id"]==$rs["id"])) $clsnm="active"; if ($phppgname!="") { if (strstr($_SERVER['SCRIPT_NAME'],$phppgname)) $clsnm="active"; } if ($rs["links"]=="") $phppgname="contents.php?id=".$rs["id"]; ?> <li class="<?php echo $clsnm;?>"><a href="<?php echo $phppgname;?>"><?php echo $rs["title"];?></a> <?php $pnds=1; if (isset($_GET["id"])) $pnds=$_GET["id"]; $sql = "SELECT id,title,subpageid FROM tblsubpage where subpageid=".$rs["id"]." order by id desc "; $reccount=$sq->numsrow($sql); if ($reccount > 0){ echo("<ul>"); ?> <?php $ata =$sq->query($sql); while($rs=$sq->fetch($ata)) { ?> <li><a href="subcontents.php?id=<?php echo $rs["subpageid"];?>&sid=<?php echo $rs["id"];?>"><?php echo $rs["title"];?></a></li> <?php } echo("</ul>"); } ?> <li class="seplie"></li> <?php $pn++; } } ?> </ul>
  7. no errors.......just blank. If I add the sub navigation (which is what I am trying to use in the dropdown) to the left hand column, it displays fine. <?php $pnds=1; if (isset($_GET["id"])) $pnds=$_GET["id"]; $sql = "SELECT id,title,subpageid FROM tblsubpage where subpageid=".$pnds." order by id desc "; $reccount=$sq->numsrow($sql); if ($reccount > 0) { $ata =$sq->query($sql); while($rs=$sq->fetch($ata)) { ?> <ul><li><a href="subcontents.php?id=<?php echo $rs["subpageid"];?>&sid=<?php echo $rs["id"];?>"><?php echo $rs["title"];?></a></li> <?php } } ?></ul>
  8. I have been trying to build a drop down menu with php and data from MySQL database but cannot seem to get it to work. I have the horizontal (main categories) displaying but the drop downs are not working. Appreciate any help and thanks in advance. <ul id="menu"> <?php $clsnm="active"; if (isset($_GET["id"])) $clsnm="footerlink"; if (strstr($_SERVER['SCRIPT_NAME'],'events.php')) $clsnm="footerlink"; if (strstr($_SERVER['SCRIPT_NAME'],'gallery.php')) $clsnm="footerlink"; if (strstr($_SERVER['SCRIPT_NAME'],'news.php')) $clsnm="footerlink"; ?> <li class="<?php echo $clsnm;?>"><a href="index.php">Home</a></li> <li class="seplie"></li> <?php $sql = "SELECT id,title,links FROM tblmain where id > 1 and head='Yes' order by sorder asc"; $reccount=$sq->numsrow($sql); if ($reccount > 0) { $ata =$sq->query($sql); while($rs=$sq->fetch($ata)) { $clsnm="footerlink"; $phppgname=$rs["links"]; if ((isset($_GET["id"])) && ($_GET["id"]==$rs["id"])) $clsnm="active"; if ($phppgname!="") { if (strstr($_SERVER['SCRIPT_NAME'],$phppgname)) $clsnm="active"; } if ($rs["links"]=="") $phppgname="contents.php?id=".$rs["id"]; ?> <li class="<?php echo $clsnm;?>"><a href="<?php echo $phppgname;?>"><?php echo $rs["title"];?></a> </li> <li class="seplie"></li> <?php $pn++; } } ?> <?php $pnds=1; if (isset($_GET["id"])) $pnds=$_GET["id"]; $sql = "SELECT id,title,subpageid FROM tblsubpage where subpageid=".$pnds." order by id desc "; $reccount=$sq->numsrow($sql); if ($reccount > 0) { $ata =$sq->query($sql); while($rs=$sq->fetch($ata)) { ?> <ul><li><a href="subcontents.php?id=<?php echo $rs["subpageid"];?>&sid=<?php echo $rs["id"];?>"><?php echo $rs["title"];?></a></li> <?php } } ?></ul> </ul>
  9. Any idea how I can add the cleanup code onClick?
  10. I have a CMS with basic toolbar and have major issues with copying and pasting from MS Word. I have a code below that I would like to test cleaning up MS Word.... <?php function word_cleanup ($str) { $pattern = "/<(\w+)>(\s| )*<\/\1>/"; $str = preg_replace($pattern, '', $str); return mb_convert_encoding($str, 'HTML-ENTITIES', 'UTF-8'); } ?> And would like to add it onClick within code below, but it doesn't seem to do anything...... <?php //we will have to dynamically generate either the edit and delete buttons or //the save button here depending on numevent. if($numMain!=-1) { echo("<tr><td colspan='2' align='center'><input type='submit' id='button' name='edit' value='Save Changes' onClick=\"saveChanges('edit'); onClick=\"function('word_cleanup');\"><input type='submit' id='button' name='delete' value='Delete' onClick=\"saveChanges('delete');\"></td></tr></table></form>"); } else { echo("<tr><td colspan='2' align='center'><input type='submit' id='button' name='save' value=' Save ' onClick=\"saveChanges('save'); onClick=\"function('word_cleanup');\"></td></tr></table></form>"); } ?> Any help, tips, suggestions would be so greatly appreciated.
  11. YAY! It worked! Thanks for all your help, I appreciate it!!
  12. My initial query works fine, displaying the results of subsectors. $sql = "select * from tblsub WHERE catid='$view' ORDER BY subsec "; However to list all the businesses under the correct subsector, I am using this.... $rs=mysql_query("SELECT tblbusiness.*, tblsub.* FROM tblbusiness JOIN tblsub WHERE tblbusiness.category = tblsub.subsec AND tblsub.catid='$view'"); As the common fld between the 2 tables is tblbusiness.category and tblsub.subsec
  13. Still shows all listings under each subsector. With my quesry I am trying to match the tblbusiness.category with the tblsub.subsec and also tblsub.catid = "$view". It displays only all lsitings as if it was simply tblsub.catid = "$view".
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.