Location: PHPKode > projects > MembersGear > membersgear/admin/admin_pages_v.php
   require_once "../config/config.php";   
           echo "<div id=\"content\" class=\"setdiv\"> ";
                echo "<br/><center><span class=\"succmsg\" style=\"text:align:center\">$lsmsg</span></center>";
                echo "<div class=\"succmsg\" style=\"width:200px\">$lsmsg</div>";
            echo "<div id=\"full-contentdiv\">"; 
            echo "<div class=\"righttop\">";
            echo "<h2 align=\"center\">";
            echo "Manage Pages";
            echo "</h2>";
            echo "</div>";
            echo "<div class=\"whole-page clear\">";
            * Updated By Jayesh : for display character based paging
            echo "<div style=\"width:56%;text-align:center;margin:2px;padding-left:60px\">";
            echo PrintABCDPaging();
            echo "</div>";
                  if(isset($_GET['letter']) and $_GET['letter'] != 'all')
                        $lsSearchLetter = $_GET['letter'];
                        $lsSearchLetter = '';   
                 $sql="select id,name,(case when LENGTH(url) >= 35 then concat('<a ','onmouseout=\"hideTooltip();\"','onmouseover=\"showTooltip(event,\'$Web_URl',url,'\');return false\"','href=\"#','\">',concat(SUBSTR(url,1,35),'...'),'</a>') else concat('<a ','onmouseout=\"hideTooltip();\"','onmouseover=\"showTooltip(event,\'$Web_URl',url,'\');return false\"','href=\"#','\">',url,'</a>') end) as url, title, metakeywords, metadescription, concat('<a href=\"',url,'\" target=\"_blank\">view</a>') as `view`
                       from ".TABLE_PREFIX."pages where name like ('".$lsSearchLetter."%')"; 

                // creates a new phpSortColumn object for ID´s 
                //$col_0 = new phpSortColumn("id", "ID");
                //creates a new phpSortcolunm objects for name
                $col_1 = new phpSortColumn("name", "Page Name");
                //$col_1 = new phpSortColumn("url", "Page Url");
                // creates a new phpSortColumn object for Tile
                $col_2 = new phpSortColumn("url", "Page Url");
                $col_3 = new phpSortColumn("title", "Page Title");

                // creates a new phpSortColumn object for Field Type

                // creates a new phpSortColumn object for Desplay Type   
                $col_4 = new phpSortColumn("metakeywords", "Metakeywords");

                // add the columns to an array 
                $columns = array(1=>$col_1, 2=>$col_2, 3=>$col_3,4=>$col_4);

                // create a new phpSortable object with the abstracted db object
                // and the array of column object
                $sortable = new phpSortable($db, $columns);
                $sortable->sortby = 'name';
                $sortable->sortdir = 'asc';
                // define the table format: cellpadding, cellspacing, border
                $sortable->setTableFormat ("2", "2", "0");

                // define the table title
                $sortable->tableTitle = "";

                // define the link for edit of entries
                $sortable->editLink = "admin_pages_m.php?action=edit";

                // Encrypt Edit and Delete Link
                $sortable->encryptlink = true;
                // open the edit page in a new window
                //$sortable->editTarget = "_blank";

                // window format for the edit page
               // $sortable->editWindowFormat = "'width=300,height=400'";

                // define the link for delete of entries
                $sortable->deleteLink = "admin_pages_m.php?action=delete";

                // define the link for add new entries
                $sortable->addLink = "admin_pages_m.php";

                // set visibility of add,edit,delete link of the grid
                // define the hint to be displyed over the add button
                $sortable->addText = "Add New Page";

                // define the key name to be attached to links
                $sortable->urlKeyName = "id";

                // define the column name of to be attached to links as key value
                $sortable->tableKeyName = "id";

                // define the prompt message to be diplayed on clicking the edit button            
                //$sortable->editPromptMsg = "Are you sure you want to edit this affiliate?";

                // define the prompt message to be diplayed on clicking the delete button
                $sortable->deletePromptMsg = "Are you sure you want to delete this Page?";

                // define the message to be diplayed if there are no results found
                $sortable->emptyMsg = "No Page found.";

                //define the deafult row number to be displayed
                $sortable->defaultRowsNum = "10";

                //define the path for the css file
                $sortable->cssFilePath = ADMIN_CSS_DIR."/phpSortable.css";

                //define the path for of the images directory
                $sortable->imgFilePath = ADMIN_IMAGE_DIR."/phpgrid/";

                // print the table            
              echo "</div>";
              echo "</div>";
              echo "</div>";
              //For display footer.php
Return current item: MembersGear