From f4ed96a67da4c023a9566fa139f55bdb8b538a0c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 2 Sep 2011 18:26:42 +0000 Subject: [PATCH] Update skeletons --- dev/skeletons/skeleton_page.php | 32 +++++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 9 deletions(-) diff --git a/dev/skeletons/skeleton_page.php b/dev/skeletons/skeleton_page.php index 02691716247..5e7d2bc74a4 100644 --- a/dev/skeletons/skeleton_page.php +++ b/dev/skeletons/skeleton_page.php @@ -52,7 +52,8 @@ $langs->load("companies"); $langs->load("other"); // Get parameters -$myparam = isset($_GET["myparam"])?$_GET["myparam"]:''; +$action = GETPOST('action'); +$myparam = GETPOST('myparam'); // Protection if external user if ($user->societe_id > 0) @@ -68,7 +69,7 @@ if ($user->societe_id > 0) * Put here all code to do according to value of "action" parameter ********************************************************************/ -if ($_GET["action"] == 'add' || $_POST["action"] == 'add') +if ($action == 'add') { $myobject=new Skeleton_Class($db); $myobject->prop1=$_POST["field1"]; @@ -89,7 +90,7 @@ if ($_GET["action"] == 'add' || $_POST["action"] == 'add') /*************************************************** -* PAGE +* VIEW * * Put here all code to build page ****************************************************/ @@ -100,16 +101,29 @@ $form=new Form($db); // Put here content of your page -// ... + +// Example 1 : Adding jquery code +print ''; -/*************************************************** -* LINKED OBJECT BLOCK -* -* Put here code to view linked object -****************************************************/ + +// Example 2 : Adding jquery code $somethingshown=$myobject->showLinkedObjectBlock(); + // End of page $db->close(); llxFooter();