| @@ 49-73 (lines=25) @@ | ||
| 46 | //Les valeurs de op qui vont permettre d'aller dans les differentes parties de la page |
|
| 47 | switch ($op) { |
|
| 48 | // Vue liste |
|
| 49 | case "liste": |
|
| 50 | //tableau des cat�gories |
|
| 51 | $criteria = new CriteriaCompo(); |
|
| 52 | $criteria->setSort('cat_weight ASC, cat_title'); |
|
| 53 | $criteria->setOrder('ASC'); |
|
| 54 | $criteria->add(new Criteria('cat_cid', '(' . implode(',', $categories) . ')','IN')); |
|
| 55 | $downloadscat_arr = $downloadscat_Handler->getall($criteria); |
|
| 56 | $mytree = new XoopsObjectTree($downloadscat_arr, 'cat_cid', 'cat_pid'); |
|
| 57 | //navigation |
|
| 58 | $navigation = TDMDownloads_PathTreeUrl($mytree, $view_downloads->getVar('cid'), $downloadscat_arr, 'cat_title', $prefix = ' <img src="images/deco/arrow.gif" alt="arrow" /> ', true, 'ASC', true); |
|
| 59 | $navigation .= ' <img src="images/deco/arrow.gif" alt="arrow" /> <a title="' . $view_downloads->getVar('title') . '" href="singlefile.php?lid=' . $view_downloads->getVar('lid') . '">' . $view_downloads->getVar('title') . '</a>'; |
|
| 60 | $navigation .= ' <img src="images/deco/arrow.gif" alt="arrow" /> ' . _MD_TDMDOWNLOADS_SINGLEFILE_REPORTBROKEN; |
|
| 61 | $xoopsTpl->assign('navigation', $navigation); |
|
| 62 | // r�f�rencement |
|
| 63 | // titre de la page |
|
| 64 | $pagetitle = _MD_TDMDOWNLOADS_SINGLEFILE_REPORTBROKEN . ' - ' . $view_downloads->getVar('title') . ' - '; |
|
| 65 | $pagetitle .= TDMDownloads_PathTreeUrl($mytree, $view_downloads->getVar('cid'), $downloadscat_arr, 'cat_title', $prefix = ' - ', false, 'DESC', true); |
|
| 66 | $xoopsTpl->assign('xoops_pagetitle', $pagetitle); |
|
| 67 | //description |
|
| 68 | $xoTheme->addMeta( 'meta', 'description', strip_tags(_MD_TDMDOWNLOADS_SINGLEFILE_REPORTBROKEN . ' (' . $view_downloads->getVar('title') . ')')); |
|
| 69 | //Affichage du formulaire de fichier bris�*/ |
|
| 70 | $obj = $downloadsbroken_Handler->create(); |
|
| 71 | $form = $obj->getForm($lid); |
|
| 72 | $xoopsTpl->assign('themeForm', $form->render()); |
|
| 73 | break; |
|
| 74 | // save |
|
| 75 | case "save": |
|
| 76 | $obj = $downloadsbroken_Handler->create(); |
|
| @@ 49-73 (lines=25) @@ | ||
| 46 | //Les valeurs de op qui vont permettre d'aller dans les differentes parties de la page |
|
| 47 | switch ($op) { |
|
| 48 | // Vue liste |
|
| 49 | case "liste": |
|
| 50 | //tableau des cat�gories |
|
| 51 | $criteria = new CriteriaCompo(); |
|
| 52 | $criteria->setSort('cat_weight ASC, cat_title'); |
|
| 53 | $criteria->setOrder('ASC'); |
|
| 54 | $criteria->add(new Criteria('cat_cid', '(' . implode(',', $categories) . ')','IN')); |
|
| 55 | $downloadscat_arr = $downloadscat_Handler->getall($criteria); |
|
| 56 | $mytree = new XoopsObjectTree($downloadscat_arr, 'cat_cid', 'cat_pid'); |
|
| 57 | //navigation |
|
| 58 | $navigation = TDMDownloads_PathTreeUrl($mytree, $view_downloads->getVar('cid'), $downloadscat_arr, 'cat_title', $prefix = ' <img src="images/deco/arrow.gif" alt="arrow" /> ', true, 'ASC', true); |
|
| 59 | $navigation .= ' <img src="images/deco/arrow.gif" alt="arrow" /> <a title="' . $view_downloads->getVar('title') . '" href="singlefile.php?lid=' . $view_downloads->getVar('lid') . '">' . $view_downloads->getVar('title') . '</a>'; |
|
| 60 | $navigation .= ' <img src="images/deco/arrow.gif" alt="arrow" /> ' . _MD_TDMDOWNLOADS_SINGLEFILE_RATHFILE; |
|
| 61 | $xoopsTpl->assign('navigation', $navigation); |
|
| 62 | // r�f�rencement |
|
| 63 | // titre de la page |
|
| 64 | $pagetitle = _MD_TDMDOWNLOADS_SINGLEFILE_RATHFILE . ' - ' . $view_downloads->getVar('title') . ' - '; |
|
| 65 | $pagetitle .= TDMDownloads_PathTreeUrl($mytree, $view_downloads->getVar('cid'), $downloadscat_arr, 'cat_title', $prefix = ' - ', false, 'DESC', true); |
|
| 66 | $xoopsTpl->assign('xoops_pagetitle', $pagetitle); |
|
| 67 | //description |
|
| 68 | $xoTheme->addMeta( 'meta', 'description', strip_tags(_MD_TDMDOWNLOADS_SINGLEFILE_RATHFILE . ' (' . $view_downloads->getVar('title') . ')')); |
|
| 69 | //Affichage du formulaire de notation des t�l�chargements |
|
| 70 | $obj = $downloadsvotedata_Handler->create(); |
|
| 71 | $form = $obj->getForm($lid); |
|
| 72 | $xoopsTpl->assign('themeForm', $form->render()); |
|
| 73 | break; |
|
| 74 | ||
| 75 | // save |
|
| 76 | case "save": |
|