Jump to content

lordrt

Members
  • Posts

    28
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

lordrt's Achievements

Member

Member (2/5)

0

Reputation

  1. Hello, anyone can help me with the steps involved in creating an image gallery using PHP and MYSQL, where thumbnails of the original images are also created, and the images change after a specific interval? My files are uploaded to a folder "upload" on the server, while also stored in a table named FILE on my database, where the structure is as follows: IDFile, IDFileDirectory, Name, Extend, Size, FinalName (jpg or png) (a unique name, e.g. 1090291.jpg)
  2. managed to solve it, had got one of the variable wrongly named, thus the cause of errors
  3. hello, I have the following code written very long ago by another person, where the aim is to get the parent child hierarchy to build a sitemap. However, I need to modify this code so that it can display the hierarchy as parent-child-subchild, and so far all attempts have failed on my side. I could only get to the display of the child, by uncommenting the code echo $childMenu['TITLE'] at the end of this code, but am not able to get to display the subchild with its link. I tried to do another for loop using the childMenu part but ended up with many errors. anyone can help me with this? <div id="map-view"> <table class="map-view"> <thead> <tr> <?php //show primary menus foreach($rootMenus as $rootMenu) { $item = cGetItemMenu($_SESSION['IDLANG'], $rootMenu['IDMENU']); ?> <th> <?php if($item != null) { switch($item[0]['IDITEMTYPE']) { case 5: ?> <a href="#" onclick="<?php echo $item[0]['CONTENT'];?>"><?php echo $rootMenu['TITLE']; ?></a> <?php break; case 6: //get info if module module $infoModule = cGetInfoModClients($item[0]['IDLINK']); // check if page exist if(!empty($infoModule)) { // On contrĂ´le que c'est bien un module switch($infoModule[0]['CODE']) { case "PATHCONTROLLER" : echo getURLRewriting($item[0]['IDITEMTYPE'], $_SESSION['IDLANG'], $infoModule[0]['IDCLIENTMODULE'], $infoModule[0]['NAME'], $rootMenu['TITLE']); break; case "JSPOPUP" : ?> <a href="#" onclick="<?php echo $infoModule[0]['ACTION'];?>"><?php echo $rootMenu['TITLE']; ?></a> <?php break; } } break; default: echo getURLRewriting($item[0]['IDITEMTYPE'], $_SESSION['IDLANG'], $item[0]['IDITEM'], $item[0]['TITLETRANSLATION'], $rootMenu['TITLE']); break; } } else { echo $rootMenu['TITLE']; } ?> </th> <?php } ?> </tr> <!--end row for primary menus--> </thead> <tbody> <tr> <?php //get child menus of primary menus foreach($rootMenus as $rootMenu) { ?> <td> <?php $childMenus = cGetMenus($idLang, 1, $rootMenu['IDMENU']); if(!empty($childMenus) && $childMenus != NULL) { ?> <table> <?php foreach($childMenus as $childMenu) { $itemChildMenu = cGetItemMenu($_SESSION['IDLANG'], $childMenu['IDMENU']); ?> <tr> <td> <?php if($itemChildMenu != null) { switch($itemChildMenu[0]['IDITEMTYPE']) { case 5: ?> <a href="#" onclick="<?php echo $itemChildMenu[0]['CONTENT'];?>"><?php echo $childMenu['TITLE']; ?></a> <?php break; default: echo getURLRewriting($itemChildMenu[0]['IDITEMTYPE'], $_SESSION['IDLANG'], $itemChildMenu[0]['IDITEM'], $itemChildMenu[0]['TITLETRANSLATION'], $childMenu['TITLE']); break; } } else { //echo $childMenu['TITLE']."<br />"; } ?> </td> </tr> <?php } ?> </table> <?php } ?> </td> <?php } ?> </tr> </tbody> </table> </div> </div>
  4. thanks both codes worked for me, but i went for mac_gyver's one which was more suited to the issue i was having
  5. Hello, I need some help in re-writing a code concerning the display of menus, where I will require to show several levels in the menu hierarchy. So far, I have a code, which was written long ago by another colleague (see attachment), where it can retrieve the "primary" menus, along with the children if any, but only upto one level, e.g. Parent Menu -> Child Menu However I would like to make the code retrieve all the levels, irrespective of the number, and show them, for e.g. Parent Menu -> Child Menu -> Sub-child Menu -> Sub-sub Child Menu and so on. Anyone can help me pls? menus.php
×
×
  • 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.