Commits

Your PHP Pro committed 80ecfdb

Fix for 'add prize' link

Comments (0)

Files changed (2)

admin/list_prize.html

       <table class="Header" border="0" cellspacing="0" cellpadding="0">
         <tr>
           <td class="HeaderLeft"><img border="0" src="../Styles/{CCS_Style}/Images/Spacer.gif"></td> 
-          <th>List of ListPrizes </th>
+          <th>List of Prizes </th>
  
           <td class="HeaderRight"><img border="0" src="../Styles/{CCS_Style}/Images/Spacer.gif"></td>
         </tr>
         </tr>
         <!-- END NoRecords -->
         <tr class="Footer">
-          <td colspan="7"><a href="{ListPrizes_Insert_Src}">Add New</a>&nbsp; 
+          <td colspan="7"><a href="{AddPrize_Link_Src}">Add Prize</a>&nbsp; 
             <!-- BEGIN Navigator Navigator -->
             <!-- BEGIN First_On --><a href="{First_URL}"><img border="0" src="../Styles/{CCS_Style}/Images/en/ButtonFirst.gif"></a> <!-- END First_On -->
             <!-- BEGIN First_Off --><img border="0" src="../Styles/{CCS_Style}/Images/en/ButtonFirstOff.gif"><!-- END First_Off -->

admin/list_prize.php

     public $Sorter_Prize_Active;
 //End Variables
 
-//Class_Initialize Event @6-D22471EC
+//Class_Initialize Event @6-B21D9AD7
     function clsGridListPrizes($RelativePath, & $Parent)
     {
         global $FileName;
         $this->Sorter_Prize_Active = new clsSorter($this->ComponentName, "Sorter_Prize_Active", $FileName, $this);
         $this->Navigator = new clsNavigator($this->ComponentName, "Navigator", $FileName, 5, tpCentered, $this);
         $this->Navigator->PageSizes = array("1", "5", "10", "25", "50");
+        $this->AddPrize_Link = new clsControl(ccsLink, "AddPrize_Link", "AddPrize_Link", ccsText, "", CCGetRequestParam("AddPrize_Link", ccsGet, NULL), $this);
+        $this->AddPrize_Link->Page = "edit_prize.php";
     }
 //End Class_Initialize Event
 
     }
 //End Initialize Method
 
-//Show Method @6-226C61EF
+//Show Method @6-87E963B0
     function Show()
     {
         $Tpl = & CCGetTemplate($this);
         $this->Sorter_Prize_Credits->Show();
         $this->Sorter_Prize_Active->Show();
         $this->Navigator->Show();
+        $this->AddPrize_Link->Show();
         $Tpl->parse();
         $Tpl->block_path = $ParentPath;
         $this->DataSource->close();
         $this->ErrorBlock = "Grid ListPrizes";
         $this->Initialize();
         $this->Prize_ID = new clsField("Prize_ID", ccsInteger, "");
-
+        
         $this->Prize_Name = new clsField("Prize_Name", ccsText, "");
-
+        
         $this->Prize_DisplayName = new clsField("Prize_DisplayName", ccsText, "");
-
+        
         $this->Prize_ClaimURL = new clsField("Prize_ClaimURL", ccsText, "");
-
+        
         $this->Prize_DisplayURLOrText = new clsField("Prize_DisplayURLOrText", ccsText, "");
-
+        
         $this->Prize_Credits = new clsField("Prize_Credits", ccsInteger, "");
-
+        
         $this->Prize_Active = new clsField("Prize_Active", ccsText, "");
-
+        
         $this->Alt_Prize_ID = new clsField("Alt_Prize_ID", ccsInteger, "");
-
+        
         $this->Alt_Prize_Name = new clsField("Alt_Prize_Name", ccsText, "");
-
+        
         $this->Alt_Prize_DisplayName = new clsField("Alt_Prize_DisplayName", ccsText, "");
-
+        
         $this->Alt_Prize_ClaimURL = new clsField("Alt_Prize_ClaimURL", ccsText, "");
-
+        
         $this->Alt_Prize_DisplayURLOrText = new clsField("Alt_Prize_DisplayURLOrText", ccsText, "");
-
+        
         $this->Alt_Prize_Credits = new clsField("Alt_Prize_Credits", ccsInteger, "");
-
+        
         $this->Alt_Prize_Active = new clsField("Alt_Prize_Active", ccsText, "");
-
+        
 
     }
 //End DataSourceClass_Initialize Event
     function SetOrder($SorterName, $SorterDirection)
     {
         $this->Order = "";
-        $this->Order = CCGetOrder($this->Order, $SorterName, $SorterDirection,
-            array("Sorter_Prize_ID" => array("Prize_ID", ""),
-            "Sorter_Prize_Name" => array("Prize_Name", ""),
-            "Sorter_Prize_DisplayName" => array("Prize_DisplayName", ""),
-            "Sorter_Prize_ClaimURL" => array("Prize_ClaimURL", ""),
-            "Sorter_Prize_DisplayURLOrText" => array("Prize_DisplayURLOrText", ""),
-            "Sorter_Prize_Credits" => array("Prize_Credits", ""),
+        $this->Order = CCGetOrder($this->Order, $SorterName, $SorterDirection, 
+            array("Sorter_Prize_ID" => array("Prize_ID", ""), 
+            "Sorter_Prize_Name" => array("Prize_Name", ""), 
+            "Sorter_Prize_DisplayName" => array("Prize_DisplayName", ""), 
+            "Sorter_Prize_ClaimURL" => array("Prize_ClaimURL", ""), 
+            "Sorter_Prize_DisplayURLOrText" => array("Prize_DisplayURLOrText", ""), 
+            "Sorter_Prize_Credits" => array("Prize_Credits", ""), 
             "Sorter_Prize_Active" => array("Prize_Active", "")));
     }
 //End SetOrder Method
              false, $this->wp->opOR(
              false, $this->wp->opOR(
              false, $this->wp->opOR(
-             false,
-             $this->wp->Criterion[1],
-             $this->wp->Criterion[2]),
-             $this->wp->Criterion[3]),
-             $this->wp->Criterion[4]),
-             $this->wp->Criterion[5]),
+             false, 
+             $this->wp->Criterion[1], 
+             $this->wp->Criterion[2]), 
+             $this->wp->Criterion[3]), 
+             $this->wp->Criterion[4]), 
+             $this->wp->Criterion[5]), 
              $this->wp->Criterion[6]);
     }
 //End Prepare Method
         $this->SQL = "SELECT *, Prize_ID \n\n" .
         "FROM Prizes {SQL_Where} {SQL_OrderBy}";
         $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeExecuteSelect", $this->Parent);
-        if ($this->CountSQL)
+        if ($this->CountSQL) 
             $this->RecordsCount = CCGetDBValue(CCBuildSQL($this->CountSQL, $this->Where, ""), $this);
         else
             $this->RecordsCount = "CCS not counted";
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.