From: <txm...@us...> - 2012-04-22 19:07:27
|
Revision: 9373 http://xoops.svn.sourceforge.net/xoops/?rev=9373&view=rev Author: txmodxoops Date: 2012-04-22 19:07:20 +0000 (Sun, 22 Apr 2012) Log Message: ----------- Updated Modified Paths: -------------- XoopsModules/xpdf/releases/1.01b/modules/xpdf/admin/documents.php XoopsModules/xpdf/releases/1.01b/modules/xpdf/admin/index.php XoopsModules/xpdf/releases/1.01b/modules/xpdf/class/xpdf_cat.php XoopsModules/xpdf/releases/1.01b/modules/xpdf/class/xpdf_doc.php XoopsModules/xpdf/releases/1.01b/modules/xpdf/include/functions.php XoopsModules/xpdf/releases/1.01b/modules/xpdf/js/js.init.js XoopsModules/xpdf/releases/1.01b/modules/xpdf/language/italian/admin.php XoopsModules/xpdf/releases/1.01b/modules/xpdf/language/italian/modinfo.php XoopsModules/xpdf/releases/1.01b/modules/xpdf/list.tag.php XoopsModules/xpdf/releases/1.01b/modules/xpdf/singledoc.php XoopsModules/xpdf/releases/1.01b/modules/xpdf/sql/mysql.sql XoopsModules/xpdf/releases/1.01b/modules/xpdf/templates/xpdf_singledoc.html XoopsModules/xpdf/releases/1.01b/modules/xpdf/templates/xpdf_viewcat.html XoopsModules/xpdf/releases/1.01b/modules/xpdf/view.tag.php XoopsModules/xpdf/releases/1.01b/modules/xpdf/xoops_version.php Modified: XoopsModules/xpdf/releases/1.01b/modules/xpdf/admin/documents.php =================================================================== --- XoopsModules/xpdf/releases/1.01b/modules/xpdf/admin/documents.php 2012-04-22 18:58:29 UTC (rev 9372) +++ XoopsModules/xpdf/releases/1.01b/modules/xpdf/admin/documents.php 2012-04-22 19:07:20 UTC (rev 9373) @@ -163,8 +163,9 @@ <th class='center'>"._WEIGHT."</th> <th class='center'>"._ONLINE."</th> <th class='center'>"._FORMACTION."</th> - </tr>"; - echo "</table><br><br>"; + </tr> + <tr><td class='errorMsg center' colspan='12'>" . _AM_XPDF_ERROR_NODOCUMENTS . "</td></tr>"; + echo "</table><br />"; } break; @@ -237,7 +238,7 @@ $form->display(); break; - case "create_pdf_doc": + case "create_pdf_file": if (isset($_REQUEST["doc_id"])) { $obj =& $docHandler->get($_REQUEST["doc_id"]); } Modified: XoopsModules/xpdf/releases/1.01b/modules/xpdf/admin/index.php =================================================================== --- XoopsModules/xpdf/releases/1.01b/modules/xpdf/admin/index.php 2012-04-22 18:58:29 UTC (rev 9372) +++ XoopsModules/xpdf/releases/1.01b/modules/xpdf/admin/index.php 2012-04-22 19:07:20 UTC (rev 9373) @@ -27,35 +27,61 @@ $indexAdmin = new ModuleAdmin(); //count "total cat" - $count_cat = $catHandler->getCount(); - //count "total doc" - $count_doc = $docsHandler->getCount(); - //count "online" $criteria = new CriteriaCompo(); + $count_cat = $catHandler->getCount($criteria); + unset($criteria); + //count "total doc" + $criteria = new CriteriaCompo(); + $criteria->add(new Criteria("doc_waiting", 0, '=')); + $criteria->add(new Criteria("doc_status", 0, '!=')); + $count_doc = $docsHandler->getCount($criteria); + unset($criteria); + //count "status" + $criteria = new CriteriaCompo(); $criteria->add(new Criteria("doc_status", 1)); $doc_status = $docsHandler->getCount($criteria); + unset($criteria); //count "waiting" + $criteria = new CriteriaCompo(); $criteria->add(new Criteria("doc_waiting", 1)); $doc_waiting = $docsHandler->getCount($criteria); - //count "online" + unset($criteria); + //count "online" + $criteria = new CriteriaCompo(); $criteria->add(new Criteria("doc_online", 1)); $doc_online = $docsHandler->getCount($criteria); - - $r = '#FF0000'; - $g = '#00AA00'; + unset($criteria); + // count "total broken" + $criteria = new CriteriaCompo(); + $criteria->add(new Criteria("doc_waiting", 0, '=')); + $criteria->add(new Criteria("doc_status", 0, '!=')); + $count_broken = $brokHandler->getCount($criteria); + unset($criteria); + // count "total modified" + $criteria = new CriteriaCompo(); + $criteria->add(new Criteria("doc_waiting", 0, '=')); + $criteria->add(new Criteria("doc_status", 0, '!=')); + $count_modified = $modHandler->getCount($criteria); + unset($criteria); + // Colors + $r = '#FF0000'; $g = '#00AA00'; $count_cat_color = ($count_cat == 0) ? $r : $g; $count_doc_color = ($count_doc == 0) ? $r : $g; $doc_status_color = ($doc_status == 0) ? $r : $g; $doc_waiting_color = ($doc_waiting == 0) ? $g : $r; $doc_online_color = ($doc_online == 0) ? $r : $g; + $count_broken_color = ($count_broken == 0) ? $g : $r; + $count_modified_color = ($count_modified == 0) ? $g : $r; // InfoBox stats $indexAdmin->addInfoBox(_AM_XPDF_STATISTICS); - $indexAdmin->addInfoBoxLine(_AM_XPDF_STATISTICS,_AM_XPDF_THEREARE_CAT, $count_cat, $count_cat_color); + $indexAdmin->addInfoBoxLine(_AM_XPDF_STATISTICS, _AM_XPDF_THEREARE_CAT, $count_cat, $count_cat_color); $indexAdmin->addInfoBoxLine(_AM_XPDF_STATISTICS,_AM_XPDF_THEREARE_DOC, $count_doc, $count_doc_color); $indexAdmin->addInfoBoxLine(_AM_XPDF_STATISTICS,_AM_XPDF_THEREARE_DOC_STATUS, $doc_status, $doc_status_color); $indexAdmin->addInfoBoxLine(_AM_XPDF_STATISTICS,_AM_XPDF_THEREARE_DOC_WAITING, $doc_waiting, $doc_waiting_color); $indexAdmin->addInfoBoxLine(_AM_XPDF_STATISTICS,_AM_XPDF_THEREARE_DOC_ONLINE, $doc_online, $doc_online_color); + $indexAdmin->addInfoBoxLine(_AM_XPDF_STATISTICS,_AM_XPDF_THEREARE_DOC_BROKEN, $count_broken, $count_broken_color); + $indexAdmin->addInfoBoxLine(_AM_XPDF_STATISTICS,_AM_XPDF_THEREARE_DOC_MODIFIED, $count_modified, $count_modified_color); // Render Index echo $indexAdmin->addNavigation("index.php"); echo $indexAdmin->renderIndex(); Modified: XoopsModules/xpdf/releases/1.01b/modules/xpdf/class/xpdf_cat.php =================================================================== --- XoopsModules/xpdf/releases/1.01b/modules/xpdf/class/xpdf_cat.php 2012-04-22 18:58:29 UTC (rev 9372) +++ XoopsModules/xpdf/releases/1.01b/modules/xpdf/class/xpdf_cat.php 2012-04-22 19:07:20 UTC (rev 9373) @@ -62,7 +62,9 @@ $form = new XoopsThemeForm($title, "form", $action, "post", true); $form->setExtra('enctype="multipart/form-data"'); // Title - $form->addElement(new XoopsFormText(_TITLE, "cat_title", 50, 255, $this->getVar("cat_title")), true); + $cat_title = $this->getVar("cat_title"); + $form->addElement(new XoopsFormText(_TITLE, "cat_title", 50, 255, $cat_title), true); + // Subcategories include_once(XOOPS_ROOT_PATH."/class/tree.php"); $catHandler =& xoops_getModuleHandler("xpdf_cat", "xpdf"); Modified: XoopsModules/xpdf/releases/1.01b/modules/xpdf/class/xpdf_doc.php =================================================================== --- XoopsModules/xpdf/releases/1.01b/modules/xpdf/class/xpdf_doc.php 2012-04-22 18:58:29 UTC (rev 9372) +++ XoopsModules/xpdf/releases/1.01b/modules/xpdf/class/xpdf_doc.php 2012-04-22 19:07:20 UTC (rev 9373) @@ -116,7 +116,7 @@ redirect_header('index.php', 2, _NOPERM); } $mytree = new XoopsObjectTree($cat_arr, "cat_id", "cat_pid"); - $form->addElement(new XoopsFormLabel(_CATEGORY, $mytree->makeSelBox("cat_pid", "cat_title","--", $this->getVar("cat_pid"),false))); + $form->addElement(new XoopsFormLabel(_CATEGORY, $mytree->makeSelBox("doc_cid", "cat_title","--", $this->getVar("doc_cid"),false))); // Subject $form->addElement(new XoopsFormText(_SUBJECT, "doc_subject", 50, 100, $this->getVar("doc_subject")), true); @@ -272,7 +272,7 @@ $form->addElement(new XoopsFormHidden('documents_modified', true)); } if($this->getVar("doc_status") != 0) { - $form->addElement(new XoopsFormHidden("op", "create_pdf_doc")); + $form->addElement(new XoopsFormHidden("op", "create_pdf_file")); } $form->addElement(new XoopsFormHidden("op", "save_doc")); $form->addElement(new XoopsFormButton("", "submit", _SUBMIT, "submit")); Modified: XoopsModules/xpdf/releases/1.01b/modules/xpdf/include/functions.php =================================================================== --- XoopsModules/xpdf/releases/1.01b/modules/xpdf/include/functions.php 2012-04-22 18:58:29 UTC (rev 9372) +++ XoopsModules/xpdf/releases/1.01b/modules/xpdf/include/functions.php 2012-04-22 19:07:20 UTC (rev 9373) @@ -106,7 +106,7 @@ * returns an image "new" or "update" **/ -function xpdf_Thumbnail($time, $status) +function xpdf_NewOrUpdate($time, $status) { $count = 7; $new = ''; $startdate = (time()-(86400 * $count)); @@ -145,20 +145,20 @@ * returns an image "popular" **/ -function xpdf_Popular($hits) +function xpdf_Popular( $hits ) { $pop = ''; if ($hits >= $GLOBALS['xoopsModuleConfig']['popular']) { $language = $GLOBALS['xoopsConfig']['language']; - if ( !is_dir( XOOPS_ROOT_PATH . "/modules/xpdf/language/" . $language . "/" ) ){ + if ( !is_dir( XPDF_PATH . "/language/" . $language . "/" ) ){ $language = 'english'; } - $img_path = XOOPS_ROOT_PATH . "/modules/xpdf/language/" . $language . "/"; - $img_url = XOOPS_URL . "/modules/xpdf/language/" . $language . "/"; + $img_path = XPDF_PATH . "/language/" . $language . "/"; + $img_url = XPDF_URL . "/language/" . $language . "/"; if ( is_readable( $img_path . 'popular.png') ){ $pop = ' <img src="' . $img_url . 'popular.png" alt="' . _MA_XPDF_INDEX_POPULAR . '" title="' . _MA_XPDF_INDEX_POPULAR . '"/>'; }else{ - $pop = ' <img src ="' . XOOPS_URL . '/modules/xpdf/language/english/popular.png" alt="' . _MA_XPDF_INDEX_POPULAR . '" title="' . _MA_XPDF_INDEX_POPULAR . '"/>'; + $pop = ' <img src ="' . XPDF_URL . '/language/english/popular.png" alt="' . _MA_XPDF_INDEX_POPULAR . '" title="' . _MA_XPDF_INDEX_POPULAR . '"/>'; } } return $pop; @@ -188,6 +188,18 @@ } } +function xpdf_paypalDonations($paypal, $title, $user, $currency, $image, $altimg) +{ + $ret = "<form name='_xclick' action='https://www.paypal.com/cgi-bin/webscr' method='post'> + <input type='hidden' name='cmd' value='_xclick'> + <input type='hidden' name='business' value='".$paypal."'> + <input type='hidden' name='item_name' value='" . $title . " (" . $user . ")'> + <input type='hidden' name='currency_code' value='" . $currency . "'> + <input type='image' src='" . $image . "' border='0' name='submit' alt='" .$altimg ."'> + </form>"; + return $ret; +} + /** * Convert StringToTime Date * Modified: XoopsModules/xpdf/releases/1.01b/modules/xpdf/js/js.init.js =================================================================== --- XoopsModules/xpdf/releases/1.01b/modules/xpdf/js/js.init.js 2012-04-22 18:58:29 UTC (rev 9372) +++ XoopsModules/xpdf/releases/1.01b/modules/xpdf/js/js.init.js 2012-04-22 19:07:20 UTC (rev 9373) @@ -11,5 +11,5 @@ $( "button, input:button, input:submit, input:file, input:reset" ).css("color","inherit").button(); $( ".check" ).css("color","#fff").button(); $( ".radio" ).css("color","#fff").buttonset(); - $( ".toolbar" ).css("color","#000").buttonset(); + $( ".toolbar" ).css("color","#000").buttonset(); }); \ No newline at end of file Modified: XoopsModules/xpdf/releases/1.01b/modules/xpdf/language/italian/admin.php =================================================================== --- XoopsModules/xpdf/releases/1.01b/modules/xpdf/language/italian/admin.php 2012-04-22 18:58:29 UTC (rev 9372) +++ XoopsModules/xpdf/releases/1.01b/modules/xpdf/language/italian/admin.php 2012-04-22 19:07:20 UTC (rev 9373) @@ -30,7 +30,7 @@ define('_AM_XPDF_THEREARE_DOC_STATUS',"Ci sono <span class='bold'>%s</span> Documenti attivi"); define('_AM_XPDF_THEREARE_DOC_WAITING',"Ci sono <span class='bold'>%s</span> Documenti in attesa"); define('_AM_XPDF_THEREARE_DOC_ONLINE',"Ci sono <span class='bold'>%s</span> Documenti online"); -define('_AM_XPDF_THEREARE_DOC_MODIFIED',"Ci sono <span class='bold'>%s</span> richieste di Documenti da modificare"); +define('_AM_XPDF_THEREARE_DOC_MODIFIED',"Ci sono <span class='bold'>%s</span> Documenti da modificare"); //Buttons define('_AM_XPDF_NEWCAT',"Aggiungi Categoria"); define('_AM_XPDF_CATLIST',"Lista Categorie"); Modified: XoopsModules/xpdf/releases/1.01b/modules/xpdf/language/italian/modinfo.php =================================================================== --- XoopsModules/xpdf/releases/1.01b/modules/xpdf/language/italian/modinfo.php 2012-04-22 18:58:29 UTC (rev 9372) +++ XoopsModules/xpdf/releases/1.01b/modules/xpdf/language/italian/modinfo.php 2012-04-22 19:07:20 UTC (rev 9373) @@ -24,7 +24,7 @@ */ // Admin define('_MI_XPDF_NAME', "Documenti Pdf"); -define('_MI_XPDF_DESC', "Questo modulo creare un documento pdf dall'inserimento di dati direttamente dall'amministrazione."); +define('_MI_XPDF_DESC', "Questo modulo crea documenti pdf<br />inserendo i dati direttamente dall'amministrazione."); //Menu define('_MI_XPDF_ADMENU1', "Dashboard"); define('_MI_XPDF_ADMENU2', "Categorie"); Modified: XoopsModules/xpdf/releases/1.01b/modules/xpdf/list.tag.php =================================================================== --- XoopsModules/xpdf/releases/1.01b/modules/xpdf/list.tag.php 2012-04-22 18:58:29 UTC (rev 9372) +++ XoopsModules/xpdf/releases/1.01b/modules/xpdf/list.tag.php 2012-04-22 19:07:20 UTC (rev 9373) @@ -22,6 +22,6 @@ * Version : 1.01 Sun 2012/02/05 1:04:25 : Timgno Exp $ * **************************************************************************** */ -include dirname(dirname(dirname(__FILE__))) . '/mainfile.php'; -header( "HTTP/1.1 301 Moved Permanently" ); header('Location: '.XOOPS_URL.str_replace('document','tag',$_SERVER['PHP_SELF'])); +include 'header.php'; +include XOOPS_ROOT_PATH . '/modules/tag/list.tag.php'; ?> \ No newline at end of file Modified: XoopsModules/xpdf/releases/1.01b/modules/xpdf/singledoc.php =================================================================== --- XoopsModules/xpdf/releases/1.01b/modules/xpdf/singledoc.php 2012-04-22 18:58:29 UTC (rev 9372) +++ XoopsModules/xpdf/releases/1.01b/modules/xpdf/singledoc.php 2012-04-22 19:07:20 UTC (rev 9373) @@ -25,14 +25,15 @@ include_once "header.php"; $xoopsOption['template_main'] = 'xpdf_singledoc.html'; include_once XOOPS_ROOT_PATH."/header.php"; -$xoTheme->addStylesheet( XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname', 'n') . '/css/styles.css', null ); +$xoTheme->addStylesheet($style); +$xoTheme->addScript($js); $doc_id = xpdf_CleanVars($_REQUEST, 'doc_id', 0, 'int'); $docHandler =& xoops_getModuleHandler("xpdf_doc", "xpdf"); // Viewing information $view_doc = $docHandler->get($doc_id); -// Redirection if the docoment does't exist or is not enabled +// Redirection if the document does't exist or is not enabled if (count($view_doc) == 0 || $view_doc->getVar('doc_status') == 0){ redirect_header('index.php', 3, _MD_XPDF_SINGLEDOC_NOTEXISTENT); exit(); @@ -45,7 +46,7 @@ exit(); } -//tableau des cat\xE9gories +// Table of categories $criteria = new CriteriaCompo(); $criteria->setSort('cat_weight ASC, cat_title'); $criteria->setOrder('ASC'); @@ -75,13 +76,13 @@ } // Output information -if ($view_doc->getVar('logourl') == 'blank.gif') { - $logourl = ''; +if ($view_doc->getVar('dic_image') == 'blank.gif') { + $dic_image = ''; }else{ - $logourl = $view_doc->getVar('logourl'); - $logourl = $uploadurl_shots . $logourl; + $dic_image = $view_doc->getVar('dic_image'); + $dic_image = $uploadurl_shots . $dic_image; } -// D\xE9fini si la personne est un admin +// Set if the user is an admin. if (is_object($xoopsUser) && $xoopsUser->isAdmin($xoopsModule->mid())) { $adminlink = '<a href="' . XPDF_URL . '/admin/documents.php?op=edit_doc&doc_id=' . $_REQUEST['doc_id'] . '" title="' . _MD_XPDF_EDITTHISPDF . '"><img src="' .$pathImageIcon. '/edit.png" border="0" alt="' . _MD_XPDF_EDITTHISPDF . '" /></a>'; } else { @@ -89,11 +90,11 @@ } $description = $view_doc->getVar('doc_description'); -$xoopsTpl->assign('description' , str_replace('[pagebreak]','',$description)); +$xoopsTpl->assign('description' , str_replace('[pagebreak]', '', $description)); $xoopsTpl->assign('did' , $doc_id); $xoopsTpl->assign('cid' , $view_doc->getVar('doc_cid')); -// Vignettes for "new" and "updated" -$new = xpdf_Thumbnail($view_doc->getVar('doc_published'), $view_doc->getVar('doc_status')); +// Images for "new" and "updated" +$new = xpdf_NewOrUpdate($view_doc->getVar('doc_published'), $view_doc->getVar('doc_status')); $pop = xpdf_Popular($view_doc->getVar('doc_view')); $xoopsTpl->assign('title' , $view_doc->getVar('doc_title')); $xoopsTpl->assign('new' , $new); @@ -103,18 +104,17 @@ $xoopsTpl->assign('author' , XoopsUser::getUnameFromId($view_doc->getVar('doc_submitter'))); $xoopsTpl->assign('views', sprintf(_MD_XPDF_SINGLEDOC_NBVIEWS,$view_doc->getVar('doc_view'))); $xoopsTpl->assign('nb_comments', sprintf(_MD_XPDF_SINGLEDOC_COMMENTS,$view_doc->getVar('doc_comments'))); -$xoopsTpl->assign('shwo_bookmark' , $GLOBALS['xoopsModuleConfig']['shwo_bookmark']); +$xoopsTpl->assign('show_bookmarks' , $GLOBALS['xoopsModuleConfig']['show_bookmarks']); $xoopsTpl->assign('show_social' , $GLOBALS['xoopsModuleConfig']['show_social']); -//paypal +// Paypal if( $view_doc->getVar('doc_paypal') != '' && $GLOBALS['xoopsModuleConfig']['use_paypal'] == true) { - $paypal = '<form name="_xclick" action="https://www.paypal.com/cgi-bin/webscr" method="post"> - <input type="hidden" name="cmd" value="_xclick"> - <input type="hidden" name="business" value="'.$view_doc->getVar('paypal').'"> - <input type="hidden" name="item_name" value="' . sprintf(_MD_XPDF_SINGLEDOC_PAYPAL, $view_doc->getVar('doc_title')) . ' (' . XoopsUser::getUnameFromId(!empty($xoopsUser) ? $xoopsUser->getVar('uid') : 0) . ')"> - <input type="hidden" name="currency_code" value="' . $GLOBALS['xoopsModuleConfig']['currency_paypal'] . '"> - <input type="image" src="' . $GLOBALS['xoopsModuleConfig']['image_paypal'] . '" border="0" name="submit" alt="'._MD_XPDF_SINGLEDOC_PAYPAL_ALTIMG.'"> - </form>'; + $paypal = xpdf_paypalDonations($view_doc->getVar('paypal'), + sprintf(_MD_XPDF_SINGLEDOC_PAYPAL, $view_doc->getVar('doc_title')), + XoopsUser::getUnameFromId(!empty($xoopsUser) ? $xoopsUser->getVar('uid') : 0), + $GLOBALS['xoopsModuleConfig']['currency_paypal'], + $GLOBALS['xoopsModuleConfig']['image_paypal'], + _MD_XPDF_SINGLEDOC_PAYPAL_ALTIMG); } else { $paypal = false; } @@ -139,7 +139,7 @@ } } -// pour utiliser tellafriend. +// To use tellafriend. if (($GLOBALS['xoopsModuleConfig']['usetellafriend'] == 1) and (is_dir('../tellafriend'))) { $string = sprintf(_MD_XPDF_SINGLEDOC_INTDOCFOUND,$xoopsConfig['sitename'].': '.XPDF_URL.'/singledoc.php?doc_id=' . $_REQUEST['doc_id']); $subject = sprintf(_MD_XPDF_SINGLEDOC_INTDOCFOUND,$xoopsConfig['sitename']); @@ -171,10 +171,10 @@ $pagetitle .= xpdf_PathTreeUrl($mytree, $view_doc->getVar('doc_cid'), $doccat_arr, 'cat_title', $prefix = ' - ', false, 'DESC', true); $xoopsTpl->assign('xoops_pagetitle', $pagetitle); //description -if (strpos($description,'[pagebreak]')==false){ - $description_short = substr($description,0,400); +if (strpos($description, '[pagebreak]') == false){ + $description_short = substr($description, 0, 400); }else{ - $description_short = substr($description,0,strpos($description,'[pagebreak]')); + $description_short = substr($description, 0, strpos($description,'[pagebreak]')); } $xoTheme->addMeta( 'meta', 'description', strip_tags($description_short)); //keywords @@ -182,10 +182,9 @@ $xoTheme->addMeta( 'meta', 'keywords', $keywords);*/ include XOOPS_ROOT_PATH.'/include/comment_view.php'; -if($GLOBALS['xoopsModuleConfig']['act_socialnetworks']== 1){ -$social = $GLOBALS['xoopsModuleConfig']['socialnetworks']; +if($GLOBALS['xoopsModuleConfig']['show_social'] == 1) { +$social = $GLOBALS['xoopsModuleConfig']['code_social']; $xoopsTpl->assign('social', $social); } include_once XOOPS_ROOT_PATH."/footer.php"; - ?> \ No newline at end of file Modified: XoopsModules/xpdf/releases/1.01b/modules/xpdf/sql/mysql.sql =================================================================== --- XoopsModules/xpdf/releases/1.01b/modules/xpdf/sql/mysql.sql 2012-04-22 18:58:29 UTC (rev 9372) +++ XoopsModules/xpdf/releases/1.01b/modules/xpdf/sql/mysql.sql 2012-04-22 19:07:20 UTC (rev 9373) @@ -58,7 +58,7 @@ `doc_comments` int (11) unsigned NOT NULL default '0', `doc_weight` int (11) NOT NULL default '0', `doc_status` tinyint (1) NOT NULL default '0', -`doc_waiting` tinyint (1) NOT NULL default '0', +`doc_waiting` tinyint (2) NOT NULL default '0', `doc_online` tinyint (1) NOT NULL default '0', `doc_dohtml` tinyint(8) NOT NULL default '0', `doc_dosmiley` tinyint(8) NOT NULL default '0', Modified: XoopsModules/xpdf/releases/1.01b/modules/xpdf/templates/xpdf_singledoc.html =================================================================== --- XoopsModules/xpdf/releases/1.01b/modules/xpdf/templates/xpdf_singledoc.html 2012-04-22 18:58:29 UTC (rev 9372) +++ XoopsModules/xpdf/releases/1.01b/modules/xpdf/templates/xpdf_singledoc.html 2012-04-22 19:07:20 UTC (rev 9373) @@ -33,6 +33,11 @@ <!-- Tag bar--> <div class="documents-tag"><{include file="db:tag_bar.html"}></div> <{/if}> +<{if $show_bookmarks}> + <div style="text-align: center; padding: 3px; margin:3px;"> + <{$show_bookmarks}> + </div> +<{/if}> <{if $show_social}> <div style="text-align: center; padding: 3px; margin:3px;"> <{$code_social}> Modified: XoopsModules/xpdf/releases/1.01b/modules/xpdf/templates/xpdf_viewcat.html =================================================================== --- XoopsModules/xpdf/releases/1.01b/modules/xpdf/templates/xpdf_viewcat.html 2012-04-22 18:58:29 UTC (rev 9372) +++ XoopsModules/xpdf/releases/1.01b/modules/xpdf/templates/xpdf_viewcat.html 2012-04-22 19:07:20 UTC (rev 9373) @@ -6,8 +6,7 @@ <{if $cat_description != ""}> <!-- Category description --> <div class="marg5 pad5"><{$cat_description}></div> - <{/if}> - + <{/if}> <!-- Start Show categories information --> <div class="xpdf-categories"> <table> Modified: XoopsModules/xpdf/releases/1.01b/modules/xpdf/view.tag.php =================================================================== --- XoopsModules/xpdf/releases/1.01b/modules/xpdf/view.tag.php 2012-04-22 18:58:29 UTC (rev 9372) +++ XoopsModules/xpdf/releases/1.01b/modules/xpdf/view.tag.php 2012-04-22 19:07:20 UTC (rev 9373) @@ -22,6 +22,6 @@ * Version : 1.01 Sun 2012/02/05 1:04:25 : Timgno Exp $ * **************************************************************************** */ -include dirname(dirname(dirname(__FILE__))) . '/mainfile.php'; -header( "HTTP/1.1 301 Moved Permanently" ); header('Location: '.XOOPS_URL.str_replace('document','tag',$_SERVER['PHP_SELF'])); +include 'header.php'; +include_once XOOPS_ROOT_PATH . '/modules/tag/view.tag.php'; ?> \ No newline at end of file Modified: XoopsModules/xpdf/releases/1.01b/modules/xpdf/xoops_version.php =================================================================== --- XoopsModules/xpdf/releases/1.01b/modules/xpdf/xoops_version.php 2012-04-22 18:58:29 UTC (rev 9372) +++ XoopsModules/xpdf/releases/1.01b/modules/xpdf/xoops_version.php 2012-04-22 19:07:20 UTC (rev 9373) @@ -189,7 +189,7 @@ $modversion['config'][$i]['description'] = "_MI_XPDF_KEYWORDS_DESC"; $modversion['config'][$i]['formtype'] = "textbox"; $modversion['config'][$i]['valuetype'] = "text"; -$modversion['config'][$i]['default'] = ""; +$modversion['config'][$i]['default'] = "xpdf, documents, pdf, categories"; $i++; //Uploads:maxsize $modversion['config'][$i]['name'] = "maxsize"; @@ -399,6 +399,13 @@ $modversion['config'][$i]['aluetype'] = "int"; $modversion['config'][$i]['default'] = 0; $i++; +$modversion['config'][$i]['name'] = "show_bookmarks"; +$modversion['config'][$i]['title'] = "_MI_XPDF_SHOWBOOKMARKS"; +$modversion['config'][$i]['description'] = "_MI_XPDF_SHOWBOOKMARKS_DESC"; +$modversion['config'][$i]['formtype'] = "yesno"; +$modversion['config'][$i]['aluetype'] = "int"; +$modversion['config'][$i]['default'] = 0; +$i++; $modversion['config'][$i]['name'] = "code_social"; $modversion['config'][$i]['title'] = "_MI_XPDF_CODESOCIAL"; $modversion['config'][$i]['description'] = "_MI_XPDF_CODESOCIAL_DESC"; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <txm...@us...> - 2012-04-30 11:26:15
|
Revision: 9413 http://xoops.svn.sourceforge.net/xoops/?rev=9413&view=rev Author: txmodxoops Date: 2012-04-30 11:26:06 +0000 (Mon, 30 Apr 2012) Log Message: ----------- Work in Progress Updated only for local test Modified Paths: -------------- XoopsModules/xpdf/releases/1.01b/modules/xpdf/admin/admin_header.php XoopsModules/xpdf/releases/1.01b/modules/xpdf/admin/broken.php XoopsModules/xpdf/releases/1.01b/modules/xpdf/admin/categories.php XoopsModules/xpdf/releases/1.01b/modules/xpdf/admin/documents.php XoopsModules/xpdf/releases/1.01b/modules/xpdf/admin/index.php XoopsModules/xpdf/releases/1.01b/modules/xpdf/admin/modified.php XoopsModules/xpdf/releases/1.01b/modules/xpdf/class/xpdf_cat.php XoopsModules/xpdf/releases/1.01b/modules/xpdf/class/xpdf_doc.php XoopsModules/xpdf/releases/1.01b/modules/xpdf/class/xpdf_mod.php XoopsModules/xpdf/releases/1.01b/modules/xpdf/css/style.css XoopsModules/xpdf/releases/1.01b/modules/xpdf/docs/changelog.txt XoopsModules/xpdf/releases/1.01b/modules/xpdf/header.php XoopsModules/xpdf/releases/1.01b/modules/xpdf/include/configs.php XoopsModules/xpdf/releases/1.01b/modules/xpdf/include/functions.php XoopsModules/xpdf/releases/1.01b/modules/xpdf/include/notification.inc.php XoopsModules/xpdf/releases/1.01b/modules/xpdf/index.php XoopsModules/xpdf/releases/1.01b/modules/xpdf/language/english/admin.php XoopsModules/xpdf/releases/1.01b/modules/xpdf/language/english/help/help.html XoopsModules/xpdf/releases/1.01b/modules/xpdf/language/english/main.php XoopsModules/xpdf/releases/1.01b/modules/xpdf/language/english/modinfo.php XoopsModules/xpdf/releases/1.01b/modules/xpdf/language/italian/admin.php XoopsModules/xpdf/releases/1.01b/modules/xpdf/language/italian/main.php XoopsModules/xpdf/releases/1.01b/modules/xpdf/language/italian/modinfo.php XoopsModules/xpdf/releases/1.01b/modules/xpdf/makepdf.php XoopsModules/xpdf/releases/1.01b/modules/xpdf/singledoc.php XoopsModules/xpdf/releases/1.01b/modules/xpdf/sql/mysql.sql XoopsModules/xpdf/releases/1.01b/modules/xpdf/submit.php XoopsModules/xpdf/releases/1.01b/modules/xpdf/templates/xpdf_doc.html XoopsModules/xpdf/releases/1.01b/modules/xpdf/templates/xpdf_footer.html XoopsModules/xpdf/releases/1.01b/modules/xpdf/templates/xpdf_index.html XoopsModules/xpdf/releases/1.01b/modules/xpdf/templates/xpdf_singledoc.html XoopsModules/xpdf/releases/1.01b/modules/xpdf/templates/xpdf_submit.html XoopsModules/xpdf/releases/1.01b/modules/xpdf/templates/xpdf_viewcat.html XoopsModules/xpdf/releases/1.01b/modules/xpdf/viewcat.php XoopsModules/xpdf/releases/1.01b/modules/xpdf/xoops_version.php Added Paths: ----------- XoopsModules/xpdf/releases/1.01b/modules/xpdf/archive.php XoopsModules/xpdf/releases/1.01b/modules/xpdf/class/xpdf_downlimit.php XoopsModules/xpdf/releases/1.01b/modules/xpdf/images/48/ XoopsModules/xpdf/releases/1.01b/modules/xpdf/images/48/down_pdf.png XoopsModules/xpdf/releases/1.01b/modules/xpdf/images/48/index.html XoopsModules/xpdf/releases/1.01b/modules/xpdf/notification_update.php XoopsModules/xpdf/releases/1.01b/modules/xpdf/ratedoc.php XoopsModules/xpdf/releases/1.01b/modules/xpdf/search.php XoopsModules/xpdf/releases/1.01b/modules/xpdf/templates/xpdf_archive.html XoopsModules/xpdf/releases/1.01b/modules/xpdf/templates/xpdf_ratedoc.html XoopsModules/xpdf/releases/1.01b/modules/xpdf/templates/xpdf_search.html XoopsModules/xpdf/releases/1.01b/modules/xpdf/templates/xpdf_topten.html XoopsModules/xpdf/releases/1.01b/modules/xpdf/topten.php XoopsModules/xpdf/releases/1.01b/modules/xpdf/viewdoc.php XoopsModules/xpdf/releases/1.01b/modules/xpdf/visit.php Modified: XoopsModules/xpdf/releases/1.01b/modules/xpdf/admin/admin_header.php =================================================================== --- XoopsModules/xpdf/releases/1.01b/modules/xpdf/admin/admin_header.php 2012-04-30 04:07:58 UTC (rev 9412) +++ XoopsModules/xpdf/releases/1.01b/modules/xpdf/admin/admin_header.php 2012-04-30 11:26:06 UTC (rev 9413) @@ -35,6 +35,9 @@ echo xoops_error(_AM_ERROR_NOFRAMEWORKS); xoops_cp_footer(); } + +$tcpdfpathDir = $GLOBALS['xoops']->path('/Frameworks/tcpdf'); + $dirname = basename(dirname(dirname( __FILE__ ) )); $module_handler =& xoops_gethandler('module'); $xoopsModule = & $module_handler->getByDirname($dirname); Modified: XoopsModules/xpdf/releases/1.01b/modules/xpdf/admin/broken.php =================================================================== --- XoopsModules/xpdf/releases/1.01b/modules/xpdf/admin/broken.php 2012-04-30 04:07:58 UTC (rev 9412) +++ XoopsModules/xpdf/releases/1.01b/modules/xpdf/admin/broken.php 2012-04-30 11:26:06 UTC (rev 9413) @@ -32,7 +32,11 @@ // View list case "list": //Affichage de la partie haute de l'administration de Xoops - echo $brokenAdmin->addNavigation('broken.php'); + echo $brokenAdmin->addNavigation('broken.php'); + $brokenAdmin->addItemButton(_AM_XPDF_CATLIST, 'categories.php?op=list', 'list'); + $brokenAdmin->addItemButton(_AM_XPDF_DOCLIST, 'documents.php?op=list', 'list'); + $brokenAdmin->addItemButton(_AM_XPDF_FILESLIST, 'filesname.php?op=list', 'list'); + echo $brokenAdmin->renderButton(); $criteria = new CriteriaCompo(); if (isset($_REQUEST['limit'])) { $criteria->setLimit($_REQUEST['limit']); Modified: XoopsModules/xpdf/releases/1.01b/modules/xpdf/admin/categories.php =================================================================== --- XoopsModules/xpdf/releases/1.01b/modules/xpdf/admin/categories.php 2012-04-30 04:07:58 UTC (rev 9412) +++ XoopsModules/xpdf/releases/1.01b/modules/xpdf/admin/categories.php 2012-04-30 11:26:06 UTC (rev 9413) @@ -23,170 +23,175 @@ * **************************************************************************** */ include "admin_header.php"; -xoops_cp_header(); -global $pathImageIcon; -// CleanVars -$op = xpdf_CleanVars($_REQUEST, 'op', 'list', 'string'); -$catAdmin = new ModuleAdmin(); -switch ($op) -{ - case "list": - default: - echo $catAdmin->addNavigation('categories.php'); - $catAdmin->addItemButton(_AM_XPDF_NEWCAT, 'categories.php?op=new_cat', 'add'); - echo $catAdmin->renderButton(); - $criteria = new CriteriaCompo(); - $criteria->setSort("cat_id"); - $criteria->setOrder("ASC"); - $numrows = $catHandler->getCount($criteria); - if (isset($_REQUEST['limit'])) { - $criteria->setLimit($_REQUEST['limit']); - $limit = $_REQUEST['limit']; - } else { - $criteria->setLimit($GLOBALS['xoopsModuleConfig']['adminperpage']); - $limit = $GLOBALS['xoopsModuleConfig']['adminperpage']; - } - if (isset($_REQUEST['start'])) { - $criteria->setStart($_REQUEST['start']); - $start = $_REQUEST['start']; - } else { - $criteria->setStart(0); - $start = 0; - } - $cat_arr = $catHandler->getall($criteria); - if ( $numrows > $limit ) { - include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; - $pagenav = new XoopsPageNav($numrows, $limit, $start, 'start', 'op=liste&limit=' . $limit); - $pagenav = $pagenav->renderNav(4); - } else { - $pagenav = ''; - } - $cat_arr = $catHandler->getall($criteria); - //Table View - if ($numrows>0) - { - echo "<table width='100%' cellspacing='1' class='outer'> - <tr> - <th class='center'>"._ID."</th> - <th class='center'>"._TITLE."</th> - <th class='center'>"._IMAGE."</th> - <th class='center'>"._DESCRIPTION."</th> - <th class='center'>"._WEIGHT."</th> - <th class='center'>"._FORMACTION."</th> - </tr>"; - $class = "odd"; - foreach (array_keys($cat_arr) as $i) - { - echo "<tr class='".$class."'>"; - $class = ($class == "even") ? "odd" : "even"; - $cat =& $catHandler->get($cat_arr[$i]->getVar("cat_pid")); - $cat_cat = $cat->getVar("cat_pid"); - $cat_img = $cat_arr[$i]->getVar("cat_image"); - $cat_img_name = substr($cat_img, 0, strpos($cat_img, '.')); - echo "<td class='center'>".$cat_arr[$i]->getVar("cat_id")."</td>"; - echo "<td class='center'>".$cat_arr[$i]->getVar("cat_title")."</td>"; - echo "<td class='center'><img src='".XOOPS_UPLOAD_URL."/xpdf/images/cat/".$cat_img."' height='30px' title='".$cat_img_name."' alt='".$cat_img_name."'></td>"; - echo "<td class='center'>".$cat_arr[$i]->getVar("cat_description")."</td>"; - echo "<td class='center'>".$cat_arr[$i]->getVar("cat_weight")."</td>"; - - echo "<td align='center' width='10%'> - <a href='categories.php?op=edit_cat&cat_id=".$cat_arr[$i]->getVar("cat_id")."'><img src=".$pathImageIcon."/edit.png alt='"._EDIT."' title='"._EDIT."'></a> - <a href='categories.php?op=delete_cat&cat_id=".$cat_arr[$i]->getVar("cat_id")."'><img src=".$pathImageIcon."/delete.png alt='"._DELETE."' title='"._DELETE."'></a> - </td>"; - echo "</tr>"; +if ( file_exists($tcpdfpathDir.'/tcpdf.php') ) +{ + xoops_cp_header(); + global $pathImageIcon; + // CleanVars + $op = xpdf_CleanVars($_REQUEST, 'op', 'list', 'string'); + $catAdmin = new ModuleAdmin(); + switch ($op) + { + case "list": + default: + echo $catAdmin->addNavigation('categories.php'); + $catAdmin->addItemButton(_AM_XPDF_NEWCAT, 'categories.php?op=new_cat', 'add'); + echo $catAdmin->renderButton(); + $criteria = new CriteriaCompo(); + $criteria->setSort("cat_weight ASC, cat_title"); + $criteria->setOrder("ASC"); + $numrows = $catHandler->getCount($criteria); + if (isset($_REQUEST['limit'])) { + $criteria->setLimit($_REQUEST['limit']); + $limit = $_REQUEST['limit']; + } else { + $criteria->setLimit($GLOBALS['xoopsModuleConfig']['adminperpage']); + $limit = $GLOBALS['xoopsModuleConfig']['adminperpage']; + } + if (isset($_REQUEST['start'])) { + $criteria->setStart($_REQUEST['start']); + $start = $_REQUEST['start']; + } else { + $criteria->setStart(0); + $start = 0; + } + $cat_arr = $catHandler->getall($criteria); + if ( $numrows > $limit ) { + include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; + $pagenav = new XoopsPageNav($numrows, $limit, $start, 'start', 'op=liste&limit=' . $limit); + $pagenav = $pagenav->renderNav(4); + } else { + $pagenav = ''; } - echo "</table><br><br>"; - } else { - echo "<table width='100%' cellspacing='1' class='outer'> - <tr> - <th class='center'>"._ID."</th> - <th class='center'>"._TITLE."</th> - <th class='center'>"._IMAGE."</th> - <th class='center'>"._DESCRIPTION."</th> - <th class='center'>"._WEIGHT."</th> - <th class='center'>"._FORMACTION."</th> - </tr>"; - echo "</table><br><br>"; - } - break; + $cat_arr = $catHandler->getall($criteria); + //Table View + if ($numrows>0) + { + echo "<table width='100%' cellspacing='1' class='outer'> + <tr> + <th class='center'>"._AM_XPDF_CAT_ID."</th> + <th class='center'>"._AM_XPDF_CAT_TITLE."</th> + <th class='center'>"._AM_XPDF_CAT_IMAGE."</th> + <th class='center'>"._AM_XPDF_CAT_DESCRIPTION."</th> + <th class='center'>"._AM_XPDF_CAT_WEIGHT."</th> + <th class='center'>"._AM_XPDF_FORMACTION."</th> + </tr>"; + $class = "odd"; + foreach (array_keys($cat_arr) as $i) + { + echo "<tr class='".$class."'>"; + $class = ($class == "even") ? "odd" : "even"; + $cat =& $catHandler->get($cat_arr[$i]->getVar("cat_pid")); + $cat_cat = $cat->getVar("cat_pid"); + $cat_img = $cat_arr[$i]->getVar("cat_image"); + $cat_img_name = substr($cat_img, 0, strpos($cat_img, '.')); + echo "<td class='center'>".$i."</td>"; + echo "<td class='center'>".$cat_arr[$i]->getVar("cat_title")."</td>"; + echo "<td class='center'><img src='".XOOPS_UPLOAD_URL."/xpdf/images/cat/".$cat_img."' height='30px' title='".$cat_img_name."' alt='".$cat_img_name."'></td>"; + echo "<td class='center'>".$cat_arr[$i]->getVar("cat_description")."</td>"; + echo "<td class='center'>".$cat_arr[$i]->getVar("cat_weight")."</td>"; + + echo "<td align='center' width='10%'> + <a href='categories.php?op=edit_cat&cat_id=".$i."'><img src=".$pathImageIcon."/edit.png alt='"._EDIT."' title='"._EDIT."'></a> + <a href='categories.php?op=delete_cat&cat_id=".$i."'><img src=".$pathImageIcon."/delete.png alt='"._DELETE."' title='"._DELETE."'></a> + </td>"; + echo "</tr>"; + } + echo "</table><br><br>"; + } else { + echo "<table width='100%' cellspacing='1' class='outer'> + <tr> + <th class='center'>"._AM_XPDF_CAT_ID."</th> + <th class='center'>"._AM_XPDF_CAT_TITLE."</th> + <th class='center'>"._AM_XPDF_CAT_IMAGE."</th> + <th class='center'>"._AM_XPDF_CAT_DESCRIPTION."</th> + <th class='center'>"._AM_XPDF_CAT_WEIGHT."</th> + <th class='center'>"._AM_XPDF_FORMACTION."</th> + </tr>"; + echo "</table><br><br>"; + } + break; - case "new_cat": - echo $catAdmin->addNavigation("categories.php"); - $catAdmin->addItemButton(_AM_XPDF_CATLIST, 'categories.php?op=list', 'list'); - echo $catAdmin->renderButton(); + case "new_cat": + echo $catAdmin->addNavigation("categories.php"); + $catAdmin->addItemButton(_AM_XPDF_CATLIST, 'categories.php?op=list', 'list'); + echo $catAdmin->renderButton(); - $obj =& $catHandler->create(); - $form = $obj->getForm(); - $form->display(); - break; - - case "save_cat": - if ( !$GLOBALS["xoopsSecurity"]->check() ) { - redirect_header("categories.php", 3, implode(",", $GLOBALS["xoopsSecurity"]->getErrors())); - } - if (isset($_REQUEST["cat_id"])) { - $obj =& $catHandler->get($_REQUEST["cat_id"]); - } else { - $obj =& $catHandler->create(); - } - global $xoopsModuleConfig; - //Form setCat - $catArray1 = array("cat_pid" => $_REQUEST["cat_pid"], "cat_title" => $_REQUEST["cat_title"]); - $obj->setVars($catArray1); - //Form cat_image $GLOBALS["xoopsModuleConfig"]["maxsize"] - include_once XOOPS_ROOT_PATH."/class/uploader.php"; - $uploaddir = XOOPS_UPLOAD_PATH."/xpdf/images/cat/"; - $uploader = new XoopsMediaUploader($uploaddir, $GLOBALS["xoopsModuleConfig"]["mimetypes"], 104857600, null, null); - if ($uploader->fetchMedia($_POST['xoops_upload_file'][0])) { - $uploader->setPrefix("cat_image_") ; - $uploader->fetchMedia($_POST['xoops_upload_file'][0]); - if (!$uploader->upload()) { - $errors = $uploader->getErrors(); - redirect_header("javascript:history.go(-1)",3, $errors); + $obj =& $catHandler->create(); + $form = $obj->getForm(); + $form->display(); + break; + + case "save_cat": + if ( !$GLOBALS["xoopsSecurity"]->check() ) { + redirect_header("categories.php", 3, implode(",", $GLOBALS["xoopsSecurity"]->getErrors())); + } + if (isset($_REQUEST["cat_id"])) { + $obj =& $catHandler->get($_REQUEST["cat_id"]); } else { - $obj->setVar("cat_image", $uploader->getSavedFileName()); + $obj =& $catHandler->create(); } - } else { - $obj->setVar("cat_image", $_REQUEST["cat_image"]); - } - //Form setCat - $catArray2 = array("cat_description" => $_REQUEST["cat_description"], "cat_weight" => $_REQUEST["cat_weight"], "cat_dohtml" => $_REQUEST["cat_dohtml"], "cat_dosmiley" => $_REQUEST["cat_dosmiley"], "cat_doxcodes" => $_REQUEST["cat_doxcodes"], "cat_doimages" => $_REQUEST["cat_doimages"], "cat_dobreak" => $_REQUEST["cat_dobreak"]); - $obj->setVars($catArray2); - - if ($catHandler->insert($obj)) { - redirect_header("categories.php?op=list", 2, _AM_XPDF_FORMOK); - } - - echo $obj->getHtmlErrors(); - $form =& $obj->getForm(); - $form->display(); - break; - - case "edit_cat": - echo $catAdmin->addNavigation("categories.php"); - $catAdmin->addItemButton(_AM_XPDF_NEWCAT, 'categories.php?op=new_cat', 'add'); - $catAdmin->addItemButton(_AM_XPDF_CATLIST, 'categories.php?op=list', 'list'); - echo $catAdmin->renderButton(); - $obj = $catHandler->get($_REQUEST["cat_id"]); - $form = $obj->getForm(); - $form->display(); - break; - - case "delete_cat": - $obj =& $catHandler->get($_REQUEST["cat_id"]); - if (isset($_REQUEST["ok"]) && $_REQUEST["ok"] == 1) { - if ( !$GLOBALS["xoopsSecurity"]->check() ) { - redirect_header("categories.php", 3, implode(",", $GLOBALS["xoopsSecurity"]->getErrors())); + global $xoopsModuleConfig; + //Form setCat + $catArray1 = array("cat_pid" => $_REQUEST["cat_pid"], "cat_title" => $_REQUEST["cat_title"]); + $obj->setVars($catArray1); + //Form cat_image $GLOBALS["xoopsModuleConfig"]["maxsize"] + include_once XOOPS_ROOT_PATH."/class/uploader.php"; + $uploader = new XoopsMediaUploader(XPDF_UPLOAD_CAT_PATH."/", $GLOBALS["xoopsModuleConfig"]["mimetypes"], 104857600, null, null); + if ($uploader->fetchMedia($_POST['xoops_upload_file'][0])) { + $uploader->setPrefix("cat_image_") ; + $uploader->fetchMedia($_POST['xoops_upload_file'][0]); + if (!$uploader->upload()) { + $errors = $uploader->getErrors(); + redirect_header("javascript:history.go(-1)",3, $errors); + } else { + $obj->setVar("cat_image", $uploader->getSavedFileName()); + } + } else { + $obj->setVar("cat_image", $_REQUEST["cat_image"]); } - if ($catHandler->delete($obj)) { - redirect_header("categories.php", 3, _AM_XPDF_FORMDELOK); + //Form setCat + $catArray2 = array("cat_description" => $_REQUEST["cat_description"], "cat_weight" => $_REQUEST["cat_weight"], "cat_dohtml" => $_REQUEST["cat_dohtml"], "cat_dosmiley" => $_REQUEST["cat_dosmiley"], "cat_doxcodes" => $_REQUEST["cat_doxcodes"], "cat_doimages" => $_REQUEST["cat_doimages"], "cat_dobreak" => $_REQUEST["cat_dobreak"]); + $obj->setVars($catArray2); + + if ($catHandler->insert($obj)) { + redirect_header("categories.php?op=list", 2, _AM_XPDF_FORMOK); + } + + echo $obj->getHtmlErrors(); + $form =& $obj->getForm(); + $form->display(); + break; + + case "edit_cat": + echo $catAdmin->addNavigation("categories.php"); + $catAdmin->addItemButton(_AM_XPDF_NEWCAT, 'categories.php?op=new_cat', 'add'); + $catAdmin->addItemButton(_AM_XPDF_CATLIST, 'categories.php?op=list', 'list'); + echo $catAdmin->renderButton(); + $obj = $catHandler->get($_REQUEST["cat_id"]); + $form = $obj->getForm(); + $form->display(); + break; + + case "delete_cat": + $obj =& $catHandler->get($_REQUEST["cat_id"]); + if (isset($_REQUEST["ok"]) && $_REQUEST["ok"] == 1) { + if ( !$GLOBALS["xoopsSecurity"]->check() ) { + redirect_header("categories.php", 3, implode(",", $GLOBALS["xoopsSecurity"]->getErrors())); + } + if ($catHandler->delete($obj)) { + redirect_header("categories.php", 3, _AM_XPDF_FORMDELOK); + } else { + echo $obj->getHtmlErrors(); + } } else { - echo $obj->getHtmlErrors(); + xoops_confirm(array("ok" => 1, "cat_id" => $_REQUEST["cat_id"], "op" => "delete_cat"), $_SERVER["REQUEST_URI"], sprintf(_AM_XPDF_FORMSUREDEL, $obj->getVar("cat_title"))); } - } else { - xoops_confirm(array("ok" => 1, "cat_id" => $_REQUEST["cat_id"], "op" => "delete_cat"), $_SERVER["REQUEST_URI"], sprintf(_AM_XPDF_FORMSUREDEL, $obj->getVar("cat_title"))); - } - break; + break; + } +} else { + xoops_cp_header(); + echo xoops_error(_AM_ERROR_NOTCPDFFRAMEWORKS); } include "admin_footer.php"; ?> \ No newline at end of file Modified: XoopsModules/xpdf/releases/1.01b/modules/xpdf/admin/documents.php =================================================================== --- XoopsModules/xpdf/releases/1.01b/modules/xpdf/admin/documents.php 2012-04-30 04:07:58 UTC (rev 9412) +++ XoopsModules/xpdf/releases/1.01b/modules/xpdf/admin/documents.php 2012-04-30 11:26:06 UTC (rev 9413) @@ -89,18 +89,18 @@ { echo "<table cellspacing='1' class='outer width100'> <tr> - <th class='center'>"._ID."</th> - <th class='center'>"._TITLE."</th> - <th class='center'>"._CATEGORY."</th> - <th class='center'>"._SUBJECT."</th> - <th class='center'>"._SUBMITTER."</th> - <th class='center'>"._CREATED."</th> - <th class='center'>"._PUBLISHED."</th> - <th class='center'>"._STATUS."</th> - <th class='center'>"._WAITING."</th> - <th class='center'>"._WEIGHT."</th> - <th class='center'>"._ONLINE."</th> - <th class='center'>"._FORMACTION."</th> + <th class='center'>"._AM_XPDF_DOC_ID."</th> + <th class='center'>"._AM_XPDF_DOC_TITLE."</th> + <th class='center'>"._AM_XPDF_DOC_CATEGORY."</th> + <th class='center'>"._AM_XPDF_DOC_SUBJECT."</th> + <th class='center'>"._AM_XPDF_DOC_SUBMITTER."</th> + <th class='center'>"._AM_XPDF_DOC_CREATED."</th> + <th class='center'>"._AM_XPDF_DOC_PUBLISHED."</th> + <th class='center'>"._AM_XPDF_DOC_STATUS."</th> + <th class='center'>"._AM_XPDF_DOC_WAITING."</th> + <th class='center'>"._AM_XPDF_DOC_WEIGHT."</th> + <th class='center'>"._AM_XPDF_DOC_ONLINE."</th> + <th class='center'>"._AM_XPDF_FORMACTION."</th> </tr>"; $class = "odd"; foreach (array_keys($doc_arr) as $i) @@ -112,10 +112,7 @@ include_once(XOOPS_ROOT_PATH."/class/tree.php"); $mytree = new XoopsObjectTree($cat_arr, 'cat_id', 'cat_pid'); $category = xpdf_PathTree($mytree, $doc_arr[$i]->getVar('doc_cid'), $cat_arr, 'cat_title', $prefix = ' <img src="../images/icons/arrow.gif"> ' ); - /* $key = $doc_arr[$i]->getVar('doc_cid'); - if (array_key_exists($key, $cat_arr)){ - $category = $cat_arr[$key]->getVar('cat_title'); - } */ + echo "<td class='center'>".$doc_arr[$i]->getVar("doc_title")."</td>"; echo "<td class='center'>".$category."</td>"; echo "<td class='center'>".$doc_arr[$i]->getVar("doc_subject")."</td>"; @@ -124,26 +121,31 @@ echo "<td class='center'>".formatTimeStamp($doc_arr[$i]->getVar("doc_published"),"S")."</td>"; if ( $doc_arr[$i]->getVar("doc_status") == 1 ) { - echo "<td class='center'><a href='./documents.php?op=delete_pdf_file&doc_id='".$doc_id."&doc_status=0' title='"._AM_XPDF_DELETEPDF."'><img src=".$pathImageIcon."/green_ball.png border='0' alt='"._AM_XPDF_DELETEPDF."' /></a></td>"; + echo "<td class='center'><a href='./documents.php?op=delete_pdf_file&did='".$doc_id."&doc_status=0' title='"._AM_XPDF_DELETEPDF."'><img src='".XPDF_URL."/images/16/green_ball.png' border='0' alt='"._AM_XPDF_DELETEPDF."' /></a></td>"; } else { - echo "<td class='center'><a href='./documents.php?op=create_pdf_file&doc_id='".$doc_id."&doc_status=1' title='"._AM_XPDF_CREATEPDF."'><img src=".$pathImageIcon."/red_ball.png border='0' alt='"._AM_XPDF_CREATEPDF."' /></a></td>"; + echo "<td class='center'><a href='./documents.php?op=create_pdf_file&did='".$doc_id."&doc_status=1' title='"._AM_XPDF_CREATEPDF."'><img src='".XPDF_URL."/images/16/red_ball.png' border='0' alt='"._AM_XPDF_CREATEPDF."' /></a></td>"; } if ( $doc_arr[$i]->getVar("doc_waiting") == 1 ) { - echo "<td class='center'><a href='./documents.php?op=approve_doc&doc_id='".$doc_id."&doc_waiting=0' title='"._AM_XPDF_CREATEPDF."'><img src=".$pathImageIcon."/orange_ball.png border='0' alt='' /></a></td>"; + echo "<td class='center'><a href='./documents.php?op=approve_doc&did='".$doc_id."&doc_waiting=0' title='"._AM_XPDF_CREATEPDF."'><img src='".XPDF_URL."/images/16/orange_ball.png' border='0' alt='' /></a></td>"; } else { - echo "<td class='center'><img src=".$pathImageIcon."/grey_ball.png border='0' alt='' /></td>"; + echo "<td class='center'><img src='".XPDF_URL."/images/16/grey_ball.png' border='0' alt='' /></td>"; } echo "<td class='center'>".$doc_arr[$i]->getVar("doc_weight")."</td>"; if ( $doc_arr[$i]->getVar("doc_online") == 1 ) { - echo "<td class='center'><a href='./documents.php?op=update_online&doc_id=".$doc_id."&doc_online=0'><img src=".$pathImageIcon."/on.png border='0' alt='"._ONLINE."' title='"._ONLINE."'></a></td>"; + echo "<td class='center'><a href='./documents.php?op=update_online&did=".$doc_id."&doc_online=0'><img src=".$pathImageIcon."/on.png border='0' alt='"._ONLINE."' title='"._ONLINE."'></a></td>"; } else { - echo "<td class='center'><a href='./documents.php?op=update_online&doc_id=".$doc_id."&doc_online=1'><img src=".$pathImageIcon."/off.png border='0' alt='"._OFFLINE."' title='"._OFFLINE."'></a></td>"; + echo "<td class='center'><a href='./documents.php?op=update_online&did=".$doc_id."&doc_online=1'><img src=".$pathImageIcon."/off.png border='0' alt='"._OFFLINE."' title='"._OFFLINE."'></a></td>"; } - - echo "<td class='center width8'> - <a href='documents.php?op=edit_doc&doc_id=".$doc_id."'><img src=".$pathImageIcon."/edit.png alt='"._EDIT."' title='"._EDIT."'></a> - <a href='documents.php?op=delete_doc&doc_id=".$doc_id."'><img src=".$pathImageIcon."/delete.png alt='"._DELETE."' title='"._DELETE."'></a> + $file_created = 0; + echo "<td class='center width6'>"; + if ( $file_created == 1 ) { + echo "<a href='./documents.php?op=display_pdf_file&did=".$doc_id."'><img src=".$pathImageIcon."/search.png border='0' alt='"._AM_XPDF_DISPLAYPDF."' title='"._AM_XPDF_DISPLAYPDF."'></a>"; + } else { + echo "<a href='./documents.php?op=create_pdf_file&did=".$doc_id."'><img src=".$pathImageIcon."/pdf.png border='0' alt='"._AM_XPDF_CREATEPDF."' title='"._AM_XPDF_CREATEPDF."'></a>\t\t"; + } + echo "<a href='documents.php?op=edit_doc&did=".$doc_id."'><img src=".$pathImageIcon."/edit.png alt='"._EDIT."' title='"._EDIT."'></a> + <a href='documents.php?op=delete_doc&did=".$doc_id."'><img src=".$pathImageIcon."/delete.png alt='"._DELETE."' title='"._DELETE."'></a> </td>"; echo "</tr>"; } @@ -151,18 +153,18 @@ } else { echo "<table cellspacing='1' class='outer width100'> <tr> - <th class='center'>"._ID."</th> - <th class='center'>"._CATEGORY."</th> - <th class='center'>"._TITLE."</th> - <th class='center'>"._SUBJECT."</th> - <th class='center'>"._SUBMITTER."</th> - <th class='center'>"._CREATED."</th> - <th class='center'>"._PUBLISHED."</th> - <th class='center'>"._STATUS."</th> - <th class='center'>"._WAITING."</th> - <th class='center'>"._WEIGHT."</th> - <th class='center'>"._ONLINE."</th> - <th class='center'>"._FORMACTION."</th> + <th class='center'>"._AM_XPDF_DOC_ID."</th> + <th class='center'>"._AM_XPDF_DOC_CATEGORY."</th> + <th class='center'>"._AM_XPDF_DOC_TITLE."</th> + <th class='center'>"._AM_XPDF_DOC_SUBJECT."</th> + <th class='center'>"._AM_XPDF_DOC_SUBMITTER."</th> + <th class='center'>"._AM_XPDF_DOC_CREATED."</th> + <th class='center'>"._AM_XPDF_DOC_PUBLISHED."</th> + <th class='center'>"._AM_XPDF_DOC_STATUS."</th> + <th class='center'>"._AM_XPDF_DOC_WAITING."</th> + <th class='center'>"._AM_XPDF_DOC_WEIGHT."</th> + <th class='center'>"._AM_XPDF_DOC_ONLINE."</th> + <th class='center'>"._AM_XPDF_FORMACTION."</th> </tr> <tr><td class='errorMsg center' colspan='12'>" . _AM_XPDF_ERROR_NODOCUMENTS . "</td></tr>"; echo "</table><br />"; @@ -176,7 +178,7 @@ echo $docAdmin->renderButton(); $obj =& $docsHandler->create(); - $form = $obj->getForm($given, false); + $form = $obj->getForm($given = array(), false); $form->display(); break; @@ -190,14 +192,15 @@ } else { $obj =& $docsHandler->create(); } - + $error = false; + $error_msg = ''; + $given = array(); $docArray1 = array("doc_cid" => $_POST["doc_cid"], "doc_filename" => strtolower($_POST["doc_filename"]), "doc_title" => $_POST["doc_title"], "doc_slogan" => $_POST["doc_slogan"], "doc_description" => $_POST["doc_description"]); //Form docs_vars $obj->setVars($docArray1); //Form doc_image include_once XOOPS_ROOT_PATH."/class/uploader.php"; - $uploaddir = XOOPS_UPLOAD_PATH."/xpdf/images/doc/"; - $uploader = new XoopsMediaUploader($uploaddir, "gif|jpeg|pjpeg|png", 104857600, null, null); + $uploader = new XoopsMediaUploader(XPDF_UPLOAD_DOC_PATH."/", $GLOBALS["xoopsModuleConfig"]["mimetypes"], 104857600, null, null); if ($uploader->fetchMedia($_POST['xoops_upload_file'][0])) { $uploader->setPrefix("doc_image_"); $uploader->fetchMedia($_POST['xoops_upload_file'][0]); @@ -211,6 +214,45 @@ $obj->setVar("doc_image", $_POST["doc_image"]); } + if (isset($_POST['doc_submitter'])){ + $obj->setVar('doc_submitter', $_POST['doc_submitter']); + $given['doc_submitter'] = $_POST['doc_submitter']; + }else{ + $obj->setVar('doc_submitter', !empty($GLOBALS['xoopsUser']) ? $GLOBALS['xoopsUser']->getVar('uid') : 0); + $given['doc_submitter'] = !empty($GLOBALS['xoopsUser']) ? $GLOBALS['xoopsUser']->getVar('uid') : 0; + } + + if (!isset($_REQUEST['document_modified'])) { + $obj->setVar('doc_published', time()); + if (isset($_POST['doc_status'])) { + $obj->setVar('doc_status', 1); + $given['doc_status'] = 1; + }else{ + $obj->setVar('doc_status', 0); + $given['doc_status'] = 0; + } + }else{ + if ($_POST['date_update'] == 'Y'){ + $obj->setVar('doc_published', xpdf_convertDate($_POST["doc_published"])); + if (isset($_POST['doc_status'])){ + $obj->setVar('doc_status', 2); + $given['doc_status'] = 1; + }else{ + $obj->setVar('doc_status', 0); + $given['doc_status'] = 0; + } + }else{ + if (isset($_POST['doc_status'])){ + $obj->setVar('doc_status', 1); + $given['doc_status'] = 1; + }else{ + $obj->setVar('doc_status', 0); + $given['doc_status'] = 0; + } + } + $given['date_update'] = $_POST['date_update']; + } + $check_doc_status = ($_REQUEST["doc_status"] == 1) ? "1" : "0"; $check_doc_waiting = ($_REQUEST["doc_waiting"] == 1) ? "1" : "0"; $check_doc_online = ($_REQUEST["doc_online"] == 1) ? "1" : "0"; @@ -220,7 +262,7 @@ $check_doc_doimages = ($_REQUEST["doc_doimages"] == 1) ? "1" : "0"; $check_doc_dobreak = ($_REQUEST["doc_dobreak"] == 1) ? "1" : "0"; - $docArray2 = array("doc_subject" => $_POST["doc_subject"], "doc_fontname" => strtolower($_POST["doc_fontname"]), "doc_fontsize" => $_POST["doc_fontsize"], "doc_keywords" => $_POST["doc_keywords"], "doc_submitter" => $_POST["doc_submitter"], "doc_created" => xpdf_convertDate($_POST["doc_created"]), "doc_published" => xpdf_convertDate($_POST["doc_published"]), "doc_view" => $_POST["doc_view"], "doc_comments" => $_POST["doc_comments"], "doc_weight" => $_POST["doc_weight"], "doc_status" => $check_doc_status, "doc_waiting" => $check_doc_waiting, "doc_online" => $check_doc_online, "doc_dohtml" => $check_doc_dohtml, "doc_dosmiley" => $check_doc_dosmiley, "doc_doxcodes" => $check_doc_doxcodes, "doc_doimages" => $check_doc_doimages, "doc_dobreak" => $check_doc_dobreak, "doc_paypal" => $_POST["doc_paypal"], "doc_price" => $_POST["doc_price"], "doc_currency" => $_POST["doc_currency"], "doc_catalogue_number" => $_POST["doc_catalogue_number"]); + $docArray2 = array("doc_subject" => $_POST["doc_subject"], "doc_fontname" => strtolower($_POST["doc_fontname"]), "doc_fontsize" => $_POST["doc_fontsize"], "doc_keywords" => $_POST["doc_keywords"], "doc_created" => xpdf_convertDate($_POST["doc_created"]), "doc_expired" => xpdf_convertDate($_POST["doc_expired"]), "doc_hits" => $_POST["doc_hits"], "doc_rating" => $_POST["doc_rating"], "doc_votes" => $_POST["doc_votes"], "doc_view" => $_POST["doc_view"], "doc_comments" => $_POST["doc_comments"], "doc_weight" => $_POST["doc_weight"], "doc_status" => $check_doc_status, "doc_waiting" => $check_doc_waiting, "doc_online" => $check_doc_online, "doc_dohtml" => $check_doc_dohtml, "doc_dosmiley" => $check_doc_dosmiley, "doc_doxcodes" => $check_doc_doxcodes, "doc_doimages" => $check_doc_doimages, "doc_dobreak" => $check_doc_dobreak, "doc_paypal" => $_POST["doc_paypal"], "doc_price" => $_POST["doc_price"], "doc_currency" => $_POST["doc_currency"], "doc_catalogue_number" => $_POST["doc_catalogue_number"]); //Form docs_vars $obj->setVars($docArray2); @@ -234,112 +276,32 @@ } echo $obj->getHtmlErrors(); - $form =& $obj->getForm($given, true); + $form =& $obj->getForm($given = array(), true); $form->display(); break; case "create_pdf_file": + $doc_id = xpdf_CleanVars($_REQUEST, 'doc_id', 1, 'int'); if (isset($_REQUEST["doc_id"])) { - $obj =& $docHandler->get($_REQUEST["doc_id"]); + $obj =& $docsHandler->get($doc_id); } $obj->setVar("doc_status", $_REQUEST["doc_status"]); - if ($docHandler->insert($obj)) { + if ($docsHandler->insert($obj)) { redirect_header("documents.php", 3, _AM_XPDF_FILECREATEDOK); } echo $obj->getHtmlErrors(); - //include_once XOOPS_URL.'/Frameworks/tcpdf/tcpdf.php'; - require_once XOOPS_ROOT_PATH.'/Frameworks/tcpdf/tcpdf.php'; - $filename = XOOPS_ROOT_PATH.'/Frameworks/tcpdf/config/lang/'._LANGCODE.'.php'; - if(file_exists($filename)) { - require_once $filename; - } else { - require_once XOOPS_ROOT_PATH.'/Frameworks/tcpdf/config/lang/en.php'; - } - $criteria = new CriteriaCompo(); - $criteria->add(new Criteria('doc_status', 0, '!=')); - $criteria->add(new Criteria('doc_id', $_REQUEST['doc_id'])); - $criteria->add(new Criteria('doc_cid', $_REQUEST['doc_cid'])); - $doc_all = $docHandler->getall($criteria); - - foreach($doc_all as $doc) { - $pdf_data['title'] = $doc->getVar('doc_title'); - $pdf_data['filename'] = $doc->getVar('doc_filename'); - $pdf_data['subject'] = $doc->getVar('doc_subject'); - $pdf_data['fontname'] = $doc->getVar('doc_fontname'); - $pdf_data['fontsize'] = $doc->getVar('doc_fontsize'); - $pdf_data['published'] = formatTimestamp($doc->getVar('doc_published')); - $pdf_data['creator'] = $GLOBALS['xoopsConfig']['sitename']; - $pdf_data['content'] = $doc->getVar('doc_description', 'n'); - $pdf_data['author'] = $doc->getVar('doc_submitter'); - $pdf_data['keywords'] = $doc->getVar('doc_keywords'); - } - - define ('PDF_CREATOR', $pdf_data['creator']); - define ('PDF_AUTHOR', $pdf_data['author']); - define ('PDF_HEADER_TITLE', $pdf_data['title']); - define ('PDF_HEADER_STRING', $pdf_data['subject']); - define ('PDF_HEADER_LOGO', 'logo.gif'); - define ('K_PATH_IMAGES', XOOPS_ROOT_PATH.'/images/'); - - $content = ''; - $content .= $myts->undoHtmlSpecialChars($pdf_data['content']); - - $pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, _CHARSET, false); - $doc_title = $myts->undoHtmlSpecialChars($pdf_data['title']); - $doc_keywords = $myts->undoHtmlSpecialChars($pdf_data['keywords']); - // For schinese - if (_LANGCODE == "cn") { - $pdf->SetFont('gbsn00lp', '', $pdf_data['fontsize']); - } else { - $pdf->SetFont($pdf_data['fontname'], '', $pdf_data['fontsize']); - } - - // set document information - $pdf->SetCreator($pdf_data['submitter']); - $pdf->SetAuthor($pdf_data['author']); - $pdf->SetTitle($pdf_data['title']); - $pdf->SetSubject($pdf_data['subject']); - $pdf->SetKeywords($doc_keywords); - - // set default header data - $pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE, PDF_HEADER_STRING); - - //set margins - $pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP + 10, PDF_MARGIN_RIGHT); - //set auto page breaks - $pdf->SetAutoPageBreak(true, PDF_MARGIN_BOTTOM); - $pdf->SetHeaderMargin(PDF_MARGIN_HEADER); - $pdf->SetFooterMargin(PDF_MARGIN_FOOTER); - $pdf->setImageScale(PDF_IMAGE_SCALE_RATIO); //set image scale factor - - // For schinese - if (_LANGCODE == "cn") { - $pdf->setHeaderFont(array('gbsn00lp', '', $pdf_data['fontsize'])); - $pdf->setFooterFont(array('gbsn00lp', '', $pdf_data['fontsize'])); - } else { - $pdf->setHeaderFont(array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN)); - $pdf->setFooterFont(array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA)); - } - //set language items - $pdf->setLanguageArray($l); - - // Initialize document - $pdf->AliasNbPages(); - // Add Page document - $pdf->AddPage(); - $pdf->writeHTMLCell($w=0, $h=0, $x='', $y='', $content, $border=0, $ln=1, $fill=0, $reseth=true, $align='', $autopadding=true); - // Pdf Filename - $pdf_filename = XOOPS_UPLOAD_PATH."/xpdf/files/".strtolower($pdf_data['filename']).".pdf"; - // Output - $pdf->Output($pdf_filename, 'F'); + if(isset($_REQUEST["doc_status"]) == 1) { + echo $obj->getPdf('F'); + } break; // Delete pdf file case "delete_pdf_file": + $doc_id = xpdf_CleanVars($_REQUEST, 'doc_id', 1, 'int'); if (isset($_REQUEST["doc_id"])) { - $obj =& $docsHandler->get($_REQUEST["doc_id"]); + $obj =& $docsHandler->get($doc_id); } $obj->setVar("doc_status", $_REQUEST["doc_status"]); - $filename = XOOPS_UPLOAD_PATH."/xpdf/files/".strtolower($obj->getVar("doc_filename")).".pdf"; + $filename = XPDF_UPLOAD_FILES_PATH."/".strtolower($obj->getVar("doc_filename")).".pdf"; if(is_dir($filename)){ if (isset($_REQUEST['ok']) && $_REQUEST['ok'] == 1) { if (!$GLOBALS['xoopsSecurity']->check()) { @@ -363,7 +325,7 @@ echo $docAdmin->renderButton(); $doc_id = xpdf_CleanVars($_REQUEST, 'doc_id', 0, 'int'); $obj = $docsHandler->get($doc_id); - $form = $obj->getForm($given, false); + $form = $obj->getForm($given = array(), false); $form->display(); break; @@ -371,8 +333,8 @@ if (isset($_REQUEST["doc_id"])) { $obj =& $docsHandler->get($_REQUEST["doc_id"]); } - $obj->setVar("doc_waiting", $_REQUEST["doc_waiting"]); - if ($docHandler->insert($obj)) { + $obj->setVar("doc_status", $_REQUEST["doc_status"]); + if ($docsHandler->insert($obj)) { redirect_header("documents.php", 3, _AM_XPDF_FILEAPPROVATEDOK); } echo $obj->getHtmlErrors(); @@ -384,7 +346,7 @@ if ( !$GLOBALS["xoopsSecurity"]->check() ) { redirect_header("documents.php", 3, implode(",", $GLOBALS["xoopsSecurity"]->getErrors())); } - if ($docHandler->delete($obj)) { + if ($docsHandler->delete($obj)) { redirect_header("documents.php", 3, _AM_XPDF_FORMDELOK); } else { echo $obj->getHtmlErrors(); Modified: XoopsModules/xpdf/releases/1.01b/modules/xpdf/admin/index.php =================================================================== --- XoopsModules/xpdf/releases/1.01b/modules/xpdf/admin/index.php 2012-04-30 04:07:58 UTC (rev 9412) +++ XoopsModules/xpdf/releases/1.01b/modules/xpdf/admin/index.php 2012-04-30 11:26:06 UTC (rev 9413) @@ -53,14 +53,10 @@ unset($criteria); // count "total broken" $criteria = new CriteriaCompo(); - $criteria->add(new Criteria("doc_waiting", 0, '=')); - $criteria->add(new Criteria("doc_status", 0, '!=')); $count_broken = $brokHandler->getCount($criteria); unset($criteria); // count "total modified" $criteria = new CriteriaCompo(); - $criteria->add(new Criteria("doc_waiting", 0, '=')); - $criteria->add(new Criteria("doc_status", 0, '!=')); $count_modified = $modHandler->getCount($criteria); unset($criteria); // Colors Modified: XoopsModules/xpdf/releases/1.01b/modules/xpdf/admin/modified.php =================================================================== --- XoopsModules/xpdf/releases/1.01b/modules/xpdf/admin/modified.php 2012-04-30 04:07:58 UTC (rev 9412) +++ XoopsModules/xpdf/releases/1.01b/modules/xpdf/admin/modified.php 2012-04-30 11:26:06 UTC (rev 9413) @@ -33,6 +33,10 @@ // Vue liste case "list": echo $modifiedAdmin->addNavigation('modified.php'); + $modifiedAdmin->addItemButton(_AM_XPDF_CATLIST, 'categories.php?op=list', 'list'); + $modifiedAdmin->addItemButton(_AM_XPDF_DOCLIST, 'documents.php?op=list', 'list'); + $modifiedAdmin->addItemButton(_AM_XPDF_FILESLIST, 'filesname.php?op=list', 'list'); + echo $modifiedAdmin->renderButton(); $criteria = new CriteriaCompo(); $criteria->setSort('requestid'); $criteria->setOrder('ASC'); Added: XoopsModules/xpdf/releases/1.01b/modules/xpdf/archive.php =================================================================== --- XoopsModules/xpdf/releases/1.01b/modules/xpdf/archive.php (rev 0) +++ XoopsModules/xpdf/releases/1.01b/modules/xpdf/archive.php 2012-04-30 11:26:06 UTC (rev 9413) @@ -0,0 +1,32 @@ +<?php +/** + * **************************************************************************** + * - A project for the Xoops CMS - (http://www.xoops.org) + * **************************************************************************** + * XPDF - MODULE FOR XOOPS + * Copyright (c) 2007 - 2012 + * TXMod Xoops (http://www.txmodxoops.org) + * + * You may not change or alter any portion of this comment or credits + * of supporting developers from this source code or any supporting source code + * which is considered copyrighted (c) material of the original comment or credit authors. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * @copyright TXMod Xoops (http://www.txmodxoops.org) + * @license GPL see LICENSE + * @package xpdf + * @author TXMod Xoops (in...@tx...) + * + * Version : 1.01 Sun 2012/02/05 1:04:25 : Timgno Exp $ + * **************************************************************************** + */ +include_once dirname(__FILE__) . '/header.php'; +$xoopsOption['template_main'] = 'xpdf_archive.html'; + +include_once XOOPS_ROOT_PATH . '/header.php'; +xoops_loadLanguage('calendar'); + +include_once XOOPS_ROOT_PATH . '/footer.php'; +?> \ No newline at end of file Modified: XoopsModules/xpdf/releases/1.01b/modules/xpdf/class/xpdf_cat.php =================================================================== --- XoopsModules/xpdf/releases/1.01b/modules/xpdf/class/xpdf_cat.php 2012-04-30 04:07:58 UTC (rev 9412) +++ XoopsModules/xpdf/releases/1.01b/modules/xpdf/class/xpdf_cat.php 2012-04-30 11:26:06 UTC (rev 9413) @@ -63,7 +63,7 @@ $form->setExtra('enctype="multipart/form-data"'); // Title $cat_title = $this->getVar("cat_title"); - $form->addElement(new XoopsFormText(_TITLE, "cat_title", 50, 255, $cat_title), true); + $form->addElement(new XoopsFormText(_AM_XPDF_CAT_TITLE, "cat_title", 50, 255, $cat_title), true); // Subcategories include_once(XOOPS_ROOT_PATH."/class/tree.php"); @@ -73,11 +73,11 @@ $criteria->setOrder('ASC'); $cat_arr = $catHandler->getall(); $mytree = new XoopsObjectTree($cat_arr, "cat_id", "cat_pid"); - $form->addElement(new XoopsFormLabel(_PID, $mytree->makeSelBox("cat_pid", "cat_title","--", $this->getVar("cat_pid"),true))); + $form->addElement(new XoopsFormLabel(_AM_XPDF_CAT_PID, $mytree->makeSelBox("cat_pid", "cat_title","--", $this->getVar("cat_pid"),true))); // Categories Images $cat_image = $this->getVar("cat_image") ? $this->getVar("cat_image") : 'blank.gif'; $uploadirectory = '/uploads/xpdf/images/cat'; - $imgtray = new XoopsFormElementTray(_IMAGE,'<br />'); + $imgtray = new XoopsFormElementTray(_AM_XPDF_CAT_IMAGE,'<br />'); $imgpath = sprintf(_AM_XPDF_FORMIMAGE_PATH, '.'.$uploadirectory); $imageselect = new XoopsFormSelect($imgpath, 'cat_image', $cat_image); $image_array = XoopsLists::getImgListAsArray( XOOPS_ROOT_PATH.$uploadirectory ); @@ -88,7 +88,7 @@ $imgtray->addElement($imageselect, false); $imgtray->addElement( new XoopsFormLabel( '', "<br /><img src='".XOOPS_URL."/".$uploadirectory."/".$cat_image."' name='image' id='image' alt='' />" ) ); $documentoseltray = new XoopsFormElementTray('','<br />'); - $documentoseltray->addElement(new XoopsFormFile(_FORMUPLOAD , "cat_image", $GLOBALS['xoopsModuleConfig']['maxsize']), false); + $documentoseltray->addElement(new XoopsFormFile(_AM_XPDF_FORMUPLOAD , "cat_image", $GLOBALS['xoopsModuleConfig']['maxsize']), false); $documentoseltray->addElement(new XoopsFormLabel(''), false); $imgtray->addElement($documentoseltray); $form->addElement($imgtray); @@ -101,34 +101,34 @@ $editor_configs["width"] = "100%"; $editor_configs["height"] = "400px"; $editor_configs["editor"] = $GLOBALS['xoopsModuleConfig']["xpdf_editor"]; - $form->addElement( new XoopsFormEditor(_DESCRIPTION, "cat_description", $editor_configs), false ); + $form->addElement( new XoopsFormEditor(_AM_XPDF_CAT_DESCRIPTION, "cat_description", $editor_configs), false ); // Weight - $form->addElement(new XoopsFormText(_WEIGHT, "cat_weight", 10, 25, $this->getVar("cat_weight")), true); + $form->addElement(new XoopsFormText(_AM_XPDF_CAT_WEIGHT, "cat_weight", 10, 25, $this->getVar("cat_weight")), true); $options_tray = new XoopsFormElementTray( _OPTIONS, '<br />' ); // cat_dohtml $dohtml = $this->isNew() ? 0 : $this->getVar("cat_dohtml"); $check_cat_dohtml = new XoopsFormCheckBox( '', 'cat_dohtml', $dohtml ); - $check_cat_dohtml->addOption( 1, _DOHTML ); + $check_cat_dohtml->addOption( 1, _AM_XPDF_DOHTML ); $options_tray->addElement( $check_cat_dohtml ); // cat_dosmiley $dosmiley = $this->isNew() ? 0 : $this->getVar("cat_dosmiley"); $check_cat_dosmiley = new XoopsFormCheckBox( '', 'cat_dosmiley', $dosmiley ); - $check_cat_dosmiley->addOption( 1, _DOSMILEY ); + $check_cat_dosmiley->addOption( 1, _AM_XPDF_DOSMILEY ); $options_tray->addElement( $check_cat_dosmiley ); // cat_doxcodes $doxcodes = $this->isNew() ? 0 : $this->getVar("cat_doxcodes"); $check_cat_doxcodes = new XoopsFormCheckBox( '', 'cat_doxcodes', $doxcodes ); - $check_cat_doxcodes->addOption( 1, _DOXCODE ); + $check_cat_doxcodes->addOption( 1, _AM_XPDF_DOXCODE ); $options_tray->addElement( $check_cat_doxcodes ); // cat_doimages $doimages = $this->isNew() ? 0 : $this->getVar("cat_doimages"); $check_cat_doimages = new XoopsFormCheckBox( '', 'cat_doimages', $doimages ); - $check_cat_doimages->addOption( 1, _DOIMAGES ); + $check_cat_doimages->addOption( 1, _AM_XPDF_DOIMAGES ); $options_tray->addElement( $check_cat_doimages ); // cat_dobreaks $dobreak = $this->isNew() ? 1 : $this->getVar("cat_dobreak"); $check_cat_dobreaks = new XoopsFormCheckBox( '', 'cat_dobreak', $dobreak ); - $check_cat_dobreaks->addOption( 1, _DOBREAK ); + $check_cat_dobreaks->addOption( 1, _AM_XPDF_DOBREAK ); $options_tray->addElement( $check_cat_dobreaks ); $form->addElement( $options_tray ); //Permissions Modified: XoopsModules/xpdf/releases/1.01b/modules/xpdf/class/xpdf_doc.php =================================================================== --- XoopsModules/xpdf/releases/1.01b/modules/xpdf/class/xpdf_doc.php 2012-04-30 04:07:58 UTC (rev 9412) +++ XoopsModules/xpdf/releases/1.01b/modules/xpdf/class/xpdf_doc.php 2012-04-30 11:26:06 UTC (rev 9413) @@ -46,6 +46,10 @@ $this->initVar("doc_submitter", XOBJ_DTYPE_INT, null, false, 10); $this->initVar("doc_created", XOBJ_DTYPE_INT, null, false, 10); $this->initVar("doc_published", XOBJ_DTYPE_INT, null, false, 10); + $this->initVar("doc_expired", XOBJ_DTYPE_INT, null, false, 10); + $this->initVar("doc_hits", XOBJ_DTYPE_INT, null, false, 11); + $this->initVar("doc_rating", XOBJ_DTYPE_DECIMAL, null, false, 6.4); + $this->initVar("doc_votes", XOBJ_DTYPE_INT, null, false, 11); $this->initVar("doc_view", XOBJ_DTYPE_INT, null, false, 11); $this->initVar("doc_comments", XOBJ_DTYPE_INT, null, false, 11); $this->initVar("doc_weight", XOBJ_DTYPE_INT, null, false, 11); @@ -67,9 +71,16 @@ { $this->__construct(); } + + function get_new_reg() + { + $new_reg = $GLOBALS['xoopsDB']->getInsertId(); + return $new_reg; + } function getForm($given = array(), $error = false, $action = false) { + global $xoopsModuleConfig; if ($action === false) { $action = $_SERVER["REQUEST_URI"]; } @@ -94,18 +105,18 @@ $form = new XoopsThemeForm($title, "form", $action, "post", true); $form->setExtra('enctype="multipart/form-data"'); // - $form->addElement(new XoopsFormText(_FILENAME, "doc_filename", 50, 255, $this->getVar("doc_filename")), true); + $form->addElement(new XoopsFormText(_AM_XPDF_DOC_FILENAME, "doc_filename", 50, 255, $this->getVar("doc_filename")), true); // - $form->addElement(new XoopsFormText(_TITLE, "doc_title", 50, 255, $this->getVar("doc_title")), true); + $form->addElement(new XoopsFormText(_AM_XPDF_DOC_TITLE, "doc_title", 50, 255, $this->getVar("doc_title")), true); // include_once(XOOPS_ROOT_PATH."/class/tree.php"); $catHandler =& xoops_getModuleHandler("xpdf_cat", "xpdf"); - $cats = xpdf_MygetItemIds('xpdf_submit', 'xpdf'); + $cats = xpdf_MygetItemIds('xpdf_submit', XPDF_DIRNAME); $criteria = new CriteriaCompo(); $criteria->setSort('cat_weight ASC, cat_title'); $criteria->setOrder('ASC'); - if ($xoopsUser) { - if ( !$xoopsUser->isAdmin($xoopsModule->mid()) ) { + if ($GLOBALS['xoopsUser']) { + if ( !$GLOBALS['xoopsUser']->isAdmin($GLOBALS['xoopsModule']->mid()) ) { $criteria->add(new Criteria('cat_id', '(' . implode(',', $cats) . ')','IN')); } } else { @@ -116,24 +127,23 @@ redirect_header('index.php', 2, _NOPERM); } $mytree = new XoopsObjectTree($cat_arr, "cat_id", "cat_pid"); - $form->addElement(new XoopsFormLabel(_CATEGORY, $mytree->makeSelBox("doc_cid", "cat_title","--", $this->getVar("doc_cid"),false))); + $form->addElement(new XoopsFormLabel(_AM_XPDF_DOC_CATEGORY, $mytree->makeSelBox("doc_cid", "cat_title","--", $this->getVar("doc_cid"),false))); // Subject - $form->addElement(new XoopsFormText(_SUBJECT, "doc_subject", 50, 100, $this->getVar("doc_subject")), true); + $form->addElement(new XoopsFormText(_AM_XPDF_DOC_SUBJECT, "doc_subject", 50, 100, $this->getVar("doc_subject")), true); // Font Name $font_tray = new XoopsFormElementTray(_FONT, ' '); - $doc_fontname = $this->getVar('doc_fontname') ? $this->getVar('doc_fontname') : 'helvetica'; - $fontnameselect = new XoopsFormSelect(_AM_XPDF_FONTNAME, 'doc_fontname', $doc_fontname); + $doc_fontname = $this->getVar('doc_fontname') ? $this->getVar('doc_fontname') : $GLOBALS['xoopsModuleConfig']['fontname']; + $fontnameselect = new XoopsFormSelect(_AM_XPDF_DOC_FONTNAME, 'doc_fontname', $doc_fontname); $fonts_array = XoopsLists::getFontList(); foreach( $fonts_array as $font ) { $fontnameselect->addOption("$font", $font); } $font_tray->addElement($fontnameselect); - // Font Size - $array_fontsize = array('8' => 8, '10' => 10, '12' => 12, '14' => 14, '16' => 16, '18' => 18, '20' => 20, '22' => 22); - $doc_fontsize = $this->getVar('doc_fontsize') ? $this->getVar('doc_fontsize') : '10'; - $fontsizeselect = new XoopsFormSelect(_AM_XPDF_FONTSIZE, 'doc_font', $doc_fontsize); - $fontsizeselect->addOptionArray($array_fontsize); + // Font Size + $doc_fontsize = $this->getVar('doc_fontsize') ? $this->getVar('doc_fontsize') : $GLOBALS['xoopsModuleConfig']['fontsize']; + $fontsizeselect = new XoopsFormSelect(_AM_XPDF_DOC_FONTSIZE, 'doc_fontsize', $doc_fontsize); + $fontsizeselect->addOptionArray($this->getFontSize()); $font_tray->addElement($fontsizeselect); $form->addElement($font_tray); // Name slogan @@ -157,7 +167,7 @@ $editor_configs["cols"] = 80; $editor_configs["width"] = "100%"; $editor_configs["height"] = "400px"; - $editor_configs["editor"] = $GLOBALS["xoopsModuleConfig"]["xpdf_editor"]; + $editor_configs["editor"] = $GLOBALS['xoopsModuleConfig']['xpdf_editor']; $desc = new XoopsFormEditor(_AM_XPDF_DOC_DESCRIPTION, "doc_description", $editor_configs); $desc->setDescription(_AM_XPDF_DOC_DESCRIPTION_DESC); $form->addElement($desc, true); @@ -176,34 +186,32 @@ $form->addElement(new XoopsFormTag('tag', 60, 255, $tagId, 0)); } // doc_image - $uploaddir = XOOPS_ROOT_PATH . '/uploads/xpdf/images/doc/' .$this->getVar('doc_image'); + $uploaddir = XPDF_UPLOAD_DOC_PATH . '/' .$this->getVar('doc_image'); $docs_img = $this->getVar('doc_image') ? $this->getVar('doc_image') : 'blank.gif'; - $uploadirectory='/uploads/xpdf/images/doc'; + $uploadirectory = '/uploads/xpdf/images/doc'; if (!is_file($uploaddir)){ $docs_img = 'blank.gif'; } $imgtray = new XoopsFormElementTray(_IMAGE,'<br />'); - $imgpath=sprintf(_AM_XPDF_FORMIMAGE_PATH, ".".$uploadirectory ); + $imgpath=sprintf(_AM_XPDF_FORMIMAGE_PATH, ".".$uploadirectory."/" ); $imageselect= new XoopsFormSelect($imgpath, 'doc_image',$docs_img); - $topics_array = XoopsLists::getImgListAsArray( XOOPS_ROOT_PATH . $uploadirectory ); + $topics_array = XoopsLists::getImgListAsArray( XPDF_UPLOAD_DOC_PATH ); foreach( $topics_array as $image ) { $imageselect->addOption("{$image}", $image); } - $imageselect->setExtra( "onchange='showImgSelected(\"image3\", \"doc_image\", \"" . $uploadirectory . "\", \"\", \"" . XOOPS_URL . "\")'" ); + $imageselect->setExtra( "onchange='showImgSelected(\"image3\", \"doc_image\", \"".$uploadirectory."\", \"\", \"".XOOPS_URL."\")'" ); $imgtray->addElement($imageselect,false); - $imgtray->addElement( new XoopsFormLabel( '', "<br /><img src='" . XOOPS_URL . "/" . $uploadirectory . "/" . $docs_img . "' name='image3' id='image3' alt='' />" ) ); - $documentoseltray= new XoopsFormElementTray('','<br />'); + $imgtray->addElement( new XoopsFormLabel('',"<br /><img src='".XPDF_UPLOAD_DOC_URL."/".$docs_img."' name='image3' id='image3' alt='' />" ) ); + $docseltray= new XoopsFormElementTray('','<br />'); if ($perm_upload == true) { - $documentoseltray->addElement(new XoopsFormFile(_AM_XPDF_FORMUPLOAD , 'attachedimage', $GLOBALS['xoopsModuleConfig']['maxsize']), false); + $docseltray->addElement(new XoopsFormFile(_AM_XPDF_FORMUPLOAD , 'attachedimage', $GLOBALS['xoopsModuleConfig']['maxsize']), false); } - $imgtray->addElement($documentoseltray); - $form->addElement($imgtray); - // doc_submitter - $form->addElement(new XoopsFormSelectUser(_SUBMITTER, "doc_submitter", false, $this->getVar("doc_submitter"), 1, false), true); + $imgtray->addElement($docseltray); + $form->addElement($imgtray); // doc_keywords - $form->addElement(new XoopsFormText(_KEYWORDS, "doc_keywords", 50, 255, $this->getVar("doc_keywords")), true); + $form->addElement(new XoopsFormText(_AM_XPDF_DOC_KEYWORDS, "doc_keywords", 50, 255, $this->getVar("doc_keywords")), true); // doc_weight - $form->addElement(new XoopsFormText(_WEIGHT, "doc_weight", 10, 25, $this->getVar("doc_weight")), true); + $form->addElement(new XoopsFormText(_AM_XPDF_DOC_WEIGHT, "doc_weight", 10, 25, $this->getVar("doc_weight")), true); // doc_paypal if ($GLOBALS['xoopsModuleConfig']['use_paypal'] == true && $GLOBALS['xoopsModuleConfig']['xpayment'] == false ) { $form->addElement(new XoopsFormText(_AM_XPDF_FORMPAYPAL, 'doc_paypal', 50, 255, $this->getVar('doc_paypal')), false); @@ -220,47 +228,104 @@ $form->addElement(new XoopsFormHidden('doc_catalogue_number', $this->getVar('doc_catalogue_number')), false); } // status - $options_tray = new XoopsFormElementTray(_OPTIONS,'<br />'); - // doc_status - $doc_status = $this->isNew() ? 0 : $this->getVar("doc_status"); - $check_doc_status = new XoopsFormCheckBox('', "doc_status", $doc_status); - $check_doc_status->addOption(1, _STATUS); - $options_tray->addElement($check_doc_status); + $options_tray = new XoopsFormElementTray(_AM_XPDF_DOC_DATE,'<br />'); + $options_tray->setDescription(_AM_XPDF_DOC_DATE_DESC); + if ($GLOBALS['xoopsUser']) { + if ( $GLOBALS['xoopsUser']->isAdmin($GLOBALS['xoopsModule']->mid()) ) { + // Submitter + if ($this->isNew()) { + $submitter = !empty($GLOBALS['xoopsUser']) ? $GLOBALS['xoopsUser']->getVar('uid') : 0; + $given['date_update'] = 0; + }else{ + $submitter = $this->getVar('doc_submitter'); + $v_date = $this->getVar('doc_published'); + } + if ($error == true) { + $date_update = $given['date_update']; + $v_status = $given['doc_status']; + $submitter = $given['doc_submitter']; + }else{ + $date_update = 'N'; + $v_status = 1; + } + $form->addElement(new XoopsFormSelectUser(_AM_XPDF_DOC_SUBMITTER, 'doc_submitter', true, $submitter, 1, false), true); + // Published + if (!$this->isNew()) { + $selection_date = new XoopsFormElementTray(_AM_XPDF_FORMDATEUPDATE); + $date = new XoopsFormRadio('', 'date_update', $date_update); + $options = array('N' =>_AM_XPDF_FORMDATEUPDATE_NO . ' (' . formatTimestamp($v_date,'s') . ')', 'Y' => _AM_XPDF_FORMDATEUPDATE_YES); + $date->addOptionArray($options); + $selection_date->addElement($date); + $selection_date->addElement(new XoopsFormTextDateSelect('', 'doc_published', '', strtotime(formatTimestamp(time())))); + $form->addElement($selection_date); + } + $status = new XoopsFormCheckBox(_AM_XPDF_DOC_STATUS, 'doc_status', $v_status); + $status->addOption(1, _AM_XPDF_DOC_STATUS_OK); + $form->addElement($status); + //Permissions to download + if ($GLOBALS['xoopsModuleConfig']['permission_download'] == 2) { + $member_handler = & xoops_gethandler('member'); + $group_list = &$member_handler->getGroupList(); + $gperm_handler = &xoops_gethandler('groupperm'); + $full_list = array_keys($group_list); + if(!$this->isNew()) { + $item_ids_doc = $gperm_handler->getGroupIds('xpdf_doc_item', $this->getVar('doc_id'), $GLOBALS['xoopsModule']->getVar('mid')); + $item_ids_doc = array_values($item_ids_doc); + $item_can_doc_checkbox = new XoopsFormCheckBox(_AM_XPDF_FORMPERMDOWNLOAD, 'item_download[]', $item_ids_doc); + } else { + $item_can_doc_checkbox = new XoopsFormCheckBox(_AM_XPDF_FORMPERMDOWNLOAD, 'item_download[]', $full_list); + } + $item_can_doc_checkbox->addOptionArray($group_list); + $form->addElement($item_can_doc_checkbox); + } + } + } + // doc_status + /*$doc_status = $this->isNew() ? 0 : $this->getVar("doc_status"); + $check_doc_status = new XoopsFormCheckBox('', "doc_status", $doc_status); + $check_doc_status->addOption(1, _AM_XPDF_DOC_STATUS); + $options_tray->addElement($check_doc_status);*/ // doc_created - $options_tray->addElement(new XoopsFormTextDateSelect(_CREATED, "doc_created", "", $this->getVar("doc_created"))); + $options_tray->addElement(new XoopsFormTextDateSelect(_AM_XPDF_DOC_CREATED, "doc_created", "", $this->getVar("doc_created"))); // doc_published - $options_tray->addElement(new XoopsFormTextDateSelect(_PUBLISHED, "doc_published", "", $this->getVar("doc_published"))); + $options_tray->addElement(new XoopsFormTextDateSelect(_AM_XPDF_DOC_PUBLISHED, "doc_published", "", $this->getVar("doc_published"))); + // doc_expired + $options_tray->addElement(new ... [truncated message content] |