function showClearData($rows)
    {
        ?>
<form action="index.php" method="post" name="adminForm">
        <?php 
        dmHTML::adminHeading(_DML_CLEARDATA, 'cleardata');
        ?>

        <table class="adminlist">
          <thead>
          <tr>
            <th width="20" align="left">
                <input type="checkbox" name="toggle" value="" onclick="checkAll(<?php 
        echo count($rows);
        ?>
);" />
            </th>
            <th width="98%" align="left">
                <?php 
        echo _DML_CLEARDATA_ITEM;
        ?>
            </th>
          </tr>
          </thead>
          <tbody>
          <?php 
        $k = 0;
        foreach ($rows as $i => $row) {
            ?>
            <tr class="row<?php 
            echo $k;
            ?>
">
                <td width="20">
                    <?php 
            echo JHTML::_('grid.id', $i, $row->name);
            ?>
                </td>
                <td>
                    <?php 
            echo $row->friendlyname;
            ?>
                </td>
            </tr><?php 
            $k = 1 - $k;
        }
        ?>
          </tbody>
        </table>
        <input type="hidden" name="option" value="com_docman" />
        <input type="hidden" name="section" value="cleardata" />
        <input type="hidden" name="task" value="" />
        <input type="hidden" name="boxchecked" value="0" />
        <?php 
        echo DOCMAN_token::render();
        ?>
        </form>
        <?php 
        include_once JPATH_ROOT . DS . 'components' . DS . 'com_docman' . DS . 'footer.php';
    }
Example #2
0
function fetchSearchForm($gid, $itemid)
{
    global $search_mode, $ordering, $invert_search, $reverse_order, $search_where, $search_phrase, $search_catid;
    // category select list
    $options = array(mosHTML::makeOption('0', _DML_ALLCATS));
    $lists['catid'] = dmHTML::categoryList($search_catid, "", $options);
    $mode = array();
    $mode[] = mosHTML::makeOption('any', _DML_SEARCH_ANYWORDS);
    $mode[] = mosHTML::makeOption('all', _DML_SEARCH_ALLWORDS);
    $mode[] = mosHTML::makeOption('exact', _DML_SEARCH_PHRASE);
    $mode[] = mosHTML::makeOption('regex', _DML_SEARCH_REGEX);
    $lists['search_mode'] = mosHTML::selectList($mode, 'search_mode', 'id="search_mode" class="inputbox"', 'value', 'text', $search_mode);
    $orders = array();
    $orders[] = mosHTML::makeOption('newest', _DML_SEARCH_NEWEST);
    $orders[] = mosHTML::makeOption('oldest', _DML_SEARCH_OLDEST);
    $orders[] = mosHTML::makeOption('popular', _DML_SEARCH_POPULAR);
    $orders[] = mosHTML::makeOption('alpha', _DML_SEARCH_ALPHABETICAL);
    $orders[] = mosHTML::makeOption('category', _DML_SEARCH_CATEGORY);
    $lists['ordering'] = mosHTML::selectList($orders, 'ordering', 'id="ordering" class="inputbox"', 'value', 'text', $ordering);
    $lists['invert_search'] = '<input type="checkbox" class="inputbox" name="invert_search" ' . ($invert_search ? ' checked ' : '') . '/>';
    $lists['reverse_order'] = '<input type="checkbox" class="inputbox" name="reverse_order" ' . ($reverse_order ? ' checked ' : '') . '/>';
    $matches = array();
    if ($search_where && count($search_where) > 0) {
        foreach ($search_where as $val) {
            $matches[] = mosHTML::makeOption($val, $val);
        }
    } else {
        $matches[] = mosHTML::makeOption('search_description', 'search_description');
    }
    $where = array();
    $where[] = mosHTML::makeOption('search_name', _DML_NAME);
    $where[] = mosHTML::makeOption('search_description', _DML_DESCRIPTION);
    $lists['search_where'] = mosHTML::selectList($where, 'search_where[]', 'id="search_where" class="inputbox" multiple="multiple" size="2"', 'value', 'text', $where);
    return HTML_DMSearch::searchForm($lists, $search_phrase);
}
Example #3
0
function fetchMethodsForm($uid, $step, $method)
{
    global $task;
    // Prompt with a list of upload methods
    $lists = array();
    $lists['methods'] = dmHTML::uploadSelectList();
    $lists['action'] = _taskLink($task, $uid, array('step' => $step + 1), false);
    return HTML_DMUpload::uploadMethodsForm($lists);
}
    function configuration(&$lists)
    {
        global $_DOCMAN;
        jimport('joomla.html.pane');
        $tabs =& JPane::getInstance('Tabs', array('useCookies' => true));
        JHTML::_('behavior.tooltip');
        ?>

        <script language="JavaScript" src="<?php 
        echo JURI::root(true);
        ?>
/includes/js/overlib_mini.js" type="text/javascript"></script>

		<style>
			.dmtitle { background-color: #EEE; font-weight:  bold; border-bottom: 1px solid #BBB; }
			.checkList label { padding-left: 10px; }
			select option.label { background-color: #EEE; border: 1px solid #DDD; color : #333; }
		</style>

        <?php 
        dmHTML::adminHeading(_DML_CONFIGURATION, 'config');
        ?>

        <div class="dm_filters">
            <span class="componentheading">docman.config.php:
			 <?php 
        echo is_writable(JPATH_ADMINISTRATOR . DS . 'components' . DS . 'com_docman' . DS . 'docman.config.php') ? '<b><font color="green">' . _DML_WRITABLE . '</font></b>' : '<b><font color="red">' . _DML_UNWRITABLE . '</font></b>';
        ?>
			</span>
        </div>

        <script language="javascript" type="text/javascript">
            function submitbutton(pressbutton) {
                var form = document.adminForm;
                if (pressbutton == 'cancel') {
                    submitform( pressbutton );
                    return;
                }
		  $msg = "";
          if (form.dmpath.value == ""){
			$msg = "\n<?php 
        echo _DML_CFG_ERR_DOCPATH;
        ?>
";
		  }
		  if( isNaN( parseInt( form.perpage.value ) ) ||
			  parseInt( form.perpage.value ) < 1 ) {
			$msg += "\n<?php 
        echo _DML_CFG_ERR_PERPAGE;
        ?>
";
		  }
		  if( isNaN( parseInt( form.days_for_new.value ) ) ||
			  parseInt( form.days_for_new.value ) < 0 ) {
			$msg += "\n<?php 
        echo _DML_CFG_ERR_NEW;
        ?>
";
		  }
		  if( isNaN( parseInt( form.hot.value ) ) ||
			  parseInt( form.hot.value ) < 0 ) {
			$msg += "\n<?php 
        echo _DML_CFG_ERR_HOT;
        ?>
";
		  }
		  if( form.user_upload.value == "<?php 
        echo _DM_PERMIT_NOOWNER;
        ?>
"){
			$msg += "\n<?php 
        echo _DML_CFG_ERR_UPLOAD;
        ?>
";
		  }
		  if( form.user_approve.value == "<?php 
        echo _DM_PERMIT_NOOWNER;
        ?>
" ){
			$msg += "\n<?php 
        echo _DML_CFG_ERR_APPROVE;
        ?>
";
		  }
		  if( form.default_viewer.value == "<?php 
        echo _DM_PERMIT_NOOWNER;
        ?>
" ){
			$msg += "\n<?php 
        echo _DML_CFG_ERR_DOWNLOAD;
        ?>
";
		  }
		  if( form.default_editor.value == "<?php 
        echo _DM_PERMIT_NOOWNER;
        ?>
" ){
			$msg += "\n<?php 
        echo _DML_CFG_ERR_EDIT;
        ?>
";
		  }

          if ( $msg != "" ){
                $msghdr = "<?php 
        echo _DML_ENTRY_ERRORS;
        ?>
";
                $msghdr += '\n=================================';
                alert( $msghdr+$msg+'\n' );

          } else {
        	   submitform( pressbutton );
          }
        }

        /* Make sure the user can only use 0-9 and K, M, G */
        function dmFilesize(f) {
        	var re = /[0-9KMGkmg]*/;
            f.value = f.value.match(re);
        }
        </script>

        <form action="index.php?option=com_docman&amp;task=saveconfig" method="post" name="adminForm" id="adminForm">
        <div id="overDiv" style="position:absolute; visibility:hidden; z-index:10000;"></div>

        <?php 
        echo $tabs->startPane("configPane");
        echo $tabs->startPanel(_DML_GENERAL, "general-page");
        ?>
	    <fieldset class="adminform">
	    <table class="admintable">
	        <tr>
	            <td class="key">
	            	<?php 
        echo _DML_VERSION;
        ?>
	            </td>
	            <td><?php 
        echo _DM_VERSION;
        ?>
</td>
	            <td>&nbsp;</td>
	        </tr>
	        <tr>
	            <td class="key">
	            	<label class="hasTip" title="<?php 
        echo _DML_CFG_PATHFORSTORING . '::' . _DML_CFG_PATHTT;
        ?>
"><?php 
        echo _DML_CFG_PATHFORSTORING;
        ?>
</label>
	            </td>
	            <td>
	                <?php 
        $newpath = JPATH_ROOT . DS . _DM_DEFAULT_DATA_FOLDER;
        $path = $_DOCMAN->getCfg('dmpath');
        if (empty($path) || !is_dir($path)) {
            $path = $newpath;
        }
        ?>
	                <input size="50" type="text" name="dmpath" value="<?php 
        echo $path;
        ?>
" />
	            </td>
				<td>
	                <input type="button" value="<?php 
        echo _DML_RESETDEFAULT;
        ?>
" name="Reset" onclick="document.adminForm.dmpath.value='<?php 
        echo addslashes($newpath);
        ?>
';" />
	            </td>
	        </tr>
	    </table>
	    </fieldset>
        <?php 
        echo $tabs->endPanel();
        echo $tabs->startPanel(_DML_FRONTEND, "frontend-page");
        ?>
    	<fieldset class="adminform">
    	<legend><?php 
        echo _DML_CFG_GENERALSET;
        ?>
</legend>
	    <table class="admintable">
	        <tr>
	            <td class="key">
	            	<label class="hasTip" title="<?php 
        echo _DML_CFG_SECTIONISDOWN . '::' . _DML_CFG_SECTIONTT;
        ?>
"><?php 
        echo _DML_CFG_SECTIONISDOWN;
        ?>
</label>
	            </td>
	            <td><?php 
        echo $lists['isDown'];
        ?>
</td>
	        </tr>
	        <tr>
	            <td class="key">
	            	<label class="hasTip" title="<?php 
        echo _DML_CFG_EXTENSIONSVIEWING . '::' . _DML_CFG_EXTENSIONSVIEWINGTT;
        ?>
"><?php 
        echo _DML_CFG_EXTENSIONSVIEWING;
        ?>
:</label>
	            </td>
	            <td><input type="text" name="viewtypes" value="<?php 
        echo $_DOCMAN->getCfg('viewtypes', "pdf|doc|txt|jpg|jpeg|gif|png");
        ?>
" style="width: 200px" /></td>
	        </tr>
	        <tr>
	            <td class="key">
	            	<label class="hasTip" title="<?php 
        echo _DML_CFG_NUMBEROFDOCS . '::' . _DML_CFG_NUMBERTT;
        ?>
"><?php 
        echo _DML_CFG_NUMBEROFDOCS;
        ?>
</label>
	            </td>
	            <td><?php 
        echo $lists['perpage'];
        ?>
</td>
	        </tr>
	         <tr>
	            <td class="key">
	            	<label><?php 
        echo _DML_CFG_DEFAULTLISTING;
        ?>
</label>
	            </td>
	            <td><?php 
        echo $lists['default_order'];
        ?>
 <?php 
        echo $lists['default_order2'];
        ?>
</td>
	        </tr>
	    </table>
	    </fieldset>
	    <fieldset class="adminform">
    	<legend><?php 
        echo _DML_CFG_THEMES;
        ?>
</legend>
	    <table class="admintable">
	        <tr>
	            <td class="key">
	            	<label><?php 
        echo _DML_CFG_ICONSIZE;
        ?>
</label>
	            </td>
	            <td><?php 
        echo $lists['icon_size'];
        ?>
</td>
	        </tr>
	         <tr>
	            <td class="key">
	            	<label class="hasTip" title="<?php 
        echo _DML_CFG_TRIMWHITESPACE . '::' . _DML_CFG_TRIMWHITESPACETT;
        ?>
"><?php 
        echo _DML_CFG_TRIMWHITESPACE;
        ?>
</label>
	            </td>
	            <td><?php 
        echo $lists['trimwhitespace'];
        ?>
</td>
	        </tr>
	     </table>
	    </fieldset>
	    <fieldset class="adminform">
    	<legend><?php 
        echo _DML_CFG_EXTRADOCINFO;
        ?>
</legend>
	    <table class="admintable">
	         <tr>
	            <td class="key">
	            	<label class="hasTip" title="<?php 
        echo _DML_CFG_DAYSFORNEW . '::' . _DML_CFG_DAYSFORNEWTT;
        ?>
"><?php 
        echo _DML_CFG_DAYSFORNEW;
        ?>
</label>
	            </td>
	            <td><input type="text" name="days_for_new" value="<?php 
        echo $_DOCMAN->getCfg('days_for_new', 5);
        ?>
" /></td>
	        </tr>
	        <tr>
	            <td class="key">
	            	<label class="hasTip" title="<?php 
        echo _DML_CFG_HOT . '::' . _DML_CFG_HOTTT;
        ?>
"><?php 
        echo _DML_CFG_HOT;
        ?>
</label>
	            </td>
	            <td><input type="text" name="hot" value="<?php 
        echo $_DOCMAN->getCfg('hot', 100);
        ?>
" /></td>
	        </tr>
	        <tr >
	            <td class="key">
	            	<label></label>
	            	<?php 
        echo _DML_CFG_DISPLAYLICENSES;
        ?>
</td>
	            <td><?php 
        echo $lists['display_license'];
        ?>
</td>
	        </tr>
	         <tr >
	            <td class="key">
	            	<label class="hasTip" title="<?php 
        echo _DML_CFG_PROCESS_BOTS . '::' . _DML_CFG_PROCESS_BOTSTT;
        ?>
"></label>
	            	<?php 
        echo _DML_CFG_PROCESS_BOTS;
        ?>
</td>
	            <td><?php 
        echo $lists['process_bots'];
        ?>
</td>
	        </tr>
	    </table>
	    </fieldset>
        <?php 
        echo $tabs->endPanel();
        echo $tabs->startPanel(_DML_PERMISSIONS, "permissions-page");
        ?>
        <fieldset class="adminform">
    	<legend><?php 
        echo _DML_CFG_GUESTPERM;
        ?>
</legend>
	    <table class="admintable">
	        <tr>
	            <td class="key">
	            	<label class="hasTip" title="<?php 
        echo _DML_CFG_GUEST . '::' . _DML_CFG_GUEST_TT;
        ?>
"><?php 
        echo _DML_CFG_GUEST;
        ?>
</label>
	            </td>
	            <td><?php 
        echo $lists['guest'];
        ?>
</td>
	        </tr>
	    </table>
	    </fieldset>
	    <fieldset class="adminform">
    	<legend><?php 
        echo _DML_CFG_FRONTPERM;
        ?>
</legend>
	    <table class="admintable">
	         <tr>
	            <td class="key">
	            	<label class="hasTip" title="<?php 
        echo _DML_CFG_UPLOAD . '::' . _DML_CFG_UPLOADTT;
        ?>
"><?php 
        echo _DML_CFG_UPLOAD;
        ?>
</label>
	            </td>
	            <td><?php 
        echo $lists['user_upload']->toHtml();
        ?>
</td>
	        </tr>
	         <tr>
	            <td class="key">
	            	<label class="hasTip" title="<?php 
        echo _DML_CFG_APPROVE . '::' . _DML_CFG_APPROVETT;
        ?>
"><?php 
        echo _DML_CFG_APPROVE;
        ?>
</label>
	            </td>
	            <td><?php 
        echo $lists['user_approve']->toHtml();
        ?>
</td>
	        </tr>
	         <tr>
	            <td class="key">
	            	<label class="hasTip" title="<?php 
        echo _DML_CFG_PUBLISH . '::' . _DML_CFG_PUBLISHTT;
        ?>
"><?php 
        echo _DML_CFG_PUBLISH;
        ?>
</label>
	            </td>
	            <td><?php 
        echo $lists['user_publish']->toHtml();
        ?>
</td>
	        </tr>
    	</table>
    	</fieldset>
	    <fieldset class="adminform">
    	<legend><?php 
        echo _DML_CFG_DOCPERM;
        ?>
</legend>
	    <table class="admintable">
	        <tr>
	            <td class="key">
	            	<label class="hasTip" title="<?php 
        echo _DML_CFG_VIEW . '::' . _DML_CFG_VIEWTT;
        ?>
"><?php 
        echo _DML_CFG_VIEW;
        ?>
</label>
	            </td>
	            <td><?php 
        echo $lists['default_viewer']->toHtml();
        ?>
</td>
	        </tr>
	         <?php 
        $author_checked = '';
        $editor_checked = '';
        $assign = $_DOCMAN->getCfg('reader_assign');
        if ($assign == 1 || $assign == 3) {
            $author_checked = 'checked';
        }
        if ($assign == 2 || $assign == 3) {
            $editor_checked = 'checked';
        }
        ?>
			<tr>
				<td class="key">
					<label class="hasTip" title="<?php 
        echo _DML_CFG_WHOCANAREADER . '::' . _DML_CFG_WHOCANAREADERTT;
        ?>
"><?php 
        echo _DML_CFG_OVERRIDEVIEW;
        ?>
</label>
				</td>
				<td class="checkList">
					<input type="checkbox" name="assign_download_author" id="assign_download_author" <?php 
        echo $author_checked;
        ?>
 /><label for="assign_download_author"><?php 
        echo _DML_CREATOR;
        ?>
</label><br />
					<input type="checkbox" name="assign_download_editor" id="assign_download_editor" <?php 
        echo $editor_checked;
        ?>
 /><label for="assign_download_editor"><?php 
        echo _DML_EDITOR;
        ?>
</label><br />
				</td>
			</tr>
	        <tr>
	            <td class="key">
	            	<label class="hasTip" title="<?php 
        echo _DML_CFG_MAINTAIN . '::' . _DML_CFG_MAINTAINTT;
        ?>
"><?php 
        echo _DML_CFG_MAINTAIN;
        ?>
</label>
	            </td>
	            <td><?php 
        echo $lists['default_maintainer']->toHtml();
        ?>
</td>
	        </tr>
	        <?php 
        $author_checked = '';
        $editor_checked = '';
        $assign = $_DOCMAN->getCfg('editor_assign');
        if ($assign == 1 || $assign == 3) {
            $author_checked = 'checked';
        }
        if ($assign == 2 || $assign == 3) {
            $editor_checked = 'checked';
        }
        ?>

			<tr>
				<td class="key">
					<label class="hasTip" title="<?php 
        echo _DML_CFG_WHOCANAEDITOR . '::' . _DML_CFG_WHOCANAEDITORTT;
        ?>
"><?php 
        echo _DML_CFG_OVERRIDEMANT;
        ?>
</label>
				</td>
				<td class="checkList">
					<input type="checkbox" name="assign_edit_author" id="assign_edit_author" <?php 
        echo $author_checked;
        ?>
 /><label for="assign_edit_author"><?php 
        echo _DML_CREATOR;
        ?>
</label><br />
					<input type="checkbox" name="assign_edit_editor" id="assign_edit_editor" <?php 
        echo $editor_checked;
        ?>
 /><label for="assign_edit_editor"><?php 
        echo _DML_EDITOR;
        ?>
</label><br />
				</td>
			</tr>
	        <tr>
	            <td class="key">
	            	<label class="hasTip" title="<?php 
        echo _DML_CFG_INDIVIDUAL_PERM . '::' . _DML_CFG_INDIVIDUAL_PERMTT;
        ?>
"><?php 
        echo _DML_CFG_INDIVIDUAL_PERM;
        ?>
</label>
	           	</td>
	            <td><?php 
        echo $lists['individual_perm'];
        ?>
</td>
	        </tr>
		</table>
   		</fieldset>
	    <fieldset class="adminform">
    	<legend><?php 
        echo _DML_CFG_CREATORPERM;
        ?>
</legend>
	    <table class="admintable">
	        <tr>
	            <td class="key">
	            	<label class="hasTip" title="<?php 
        echo _DML_CFG_CREATORS_PERM . '::' . _DML_CFG_CREATORSPERMTT;
        ?>
"><?php 
        echo _DML_CFG_CREATORS_PERM;
        ?>
</label>
	            </td>
	            <td><?php 
        echo $lists['creator_can'];
        ?>
</td>
	        </tr>
    	</table>
    	</fieldset>
        <?php 
        echo $tabs->endPanel();
        echo $tabs->startPanel(_DML_UPLOAD, "upload-page");
        ?>
	    <fieldset class="adminform">
    	<legend><?php 
        echo _DML_CFG_GENERALSET;
        ?>
</legend>
	    <table class="admintable">
	        <tr>
				<td class="key">
					<label class="hasTip" title="<?php 
        echo _DML_CFG_UPMETHODS . '::' . _DML_CFG_UPMETHODSTT;
        ?>
"><?php 
        echo _DML_CFG_UPMETHODS;
        ?>
</label>
				</td>
				<td><?php 
        echo $lists['methods'];
        ?>
</td>
			</tr>
	        <tr>
	            <td class="key">
	            	<label class="hasTip" title="<?php 
        echo _DML_CFG_MAXFILESIZE . '::' . _DML_CFG_MAXFILESIZETT . ini_get('upload_max_filesize');
        ?>
"><?php 
        echo _DML_CFG_MAXFILESIZE;
        ?>
</label>
	            </td>
	            <td><input type="text" name="maxAllowed" onkeyup="javascript:dmFilesize(this)" value="<?php 
        echo DOCMAN_Utils::number2text($_DOCMAN->getCfg('maxAllowed', 1024000));
        ?>
" /> <small><?php 
        echo JText::_('Maximum');
        ?>
: <?php 
        echo $lists['maxini'];
        ?>
</small></td>
	        </tr>
	         <tr>
	            <td class="key">
	            	<label class="hasTip" title="<?php 
        echo _DML_CFG_OVERWRITEFILES . '::' . _DML_CFG_OVERWRITEFILESTT;
        ?>
"><?php 
        echo _DML_CFG_OVERWRITEFILES;
        ?>
</label>
	            </td>
	            <td><?php 
        echo $lists['overwrite'];
        ?>
</td>
	        </tr>
	    </table>
   		</fieldset>
	    <fieldset class="adminform">
    	<legend><?php 
        echo _DML_CFG_FILEXTENSIONS;
        ?>
</legend>
	    <table class="admintable">
	        <tr>
	            <td class="key">
	            	<label class="hasTip" title="<?php 
        echo _DML_CFG_EXTALLOWED . '::' . _DML_CFG_EXTALLOWEDTT;
        ?>
"><?php 
        echo _DML_CFG_EXTALLOWED;
        ?>
</label>
	            </td>
	            <td><input type="text" name="extensions" value="<?php 
        echo $_DOCMAN->getCfg('extensions', "zip|rar|pdf|txt");
        ?>
" /></td>
	        </tr>
	        <tr>
	            <td class="key">
	            	<label class="hasTip" title="<?php 
        echo _DML_CFG_USERCANUPLOAD . '::' . _DML_CFG_USERCANUPLOADTT;
        ?>
"><?php 
        echo _DML_CFG_USERCANUPLOAD;
        ?>
</label>
	            </td>
	            <td><?php 
        echo $lists['user_all'];
        ?>
</td>
	        </tr>
	    </table>
   		</fieldset>
	    <fieldset class="adminform">
    	<legend><?php 
        echo _DML_CFG_FILENAMES;
        ?>
</legend>
	    <table class="admintable">
	        <tr>
	            <td class="key">
	            	<label class="hasTip" title="<?php 
        echo _DML_CFG_LOWERCASE . '::' . _DML_CFG_LOWERCASETT;
        ?>
"><?php 
        echo _DML_CFG_LOWERCASE;
        ?>
</label>
	            </td>
	            <td><?php 
        echo $lists['fname_lc'];
        ?>
</td>
	        </tr>
	        <tr>
	            <td class="key">
	            	<label class="hasTip" title="<?php 
        echo _DML_CFG_FILENAMEBLANKS . '::' . _DML_CFG_FILENAMEBLANKSTT;
        ?>
"><?php 
        echo _DML_CFG_FILENAMEBLANKS;
        ?>
:</label>
	            </td>
	            <td><?php 
        echo $lists['fname_blank'];
        ?>
</td>
	        </tr>
	        <tr>
	            <td class="key">
	            	<label class="hasTip" title="<?php 
        echo _DML_CFG_REJECTFILENAMES . '::' . _DML_CFG_REJECTFILENAMESTT;
        ?>
"><?php 
        echo _DML_CFG_REJECTFILENAMES;
        ?>
:</label>
	            </td>
	            <td><input type="text" name="fname_reject" value="<?php 
        echo htmlentities($_DOCMAN->getCfg('fname_reject', ''), ENT_QUOTES);
        ?>
" /></td>
	        </tr>
	    </table>
	    </fieldset>
        <?php 
        echo $tabs->endPanel();
        echo $tabs->startPanel(_DML_SECURITY, "security-page");
        ?>
	    <fieldset class="adminform">
	    <table class="admintable">
	        <tr>
	            <td class="key">
	            	<label class="hasTip" title="<?php 
        echo _DML_CFG_ANTILEECH . '::' . _DML_CFG_ANTILEECHTT;
        ?>
"><?php 
        echo _DML_CFG_ANTILEECH;
        ?>
</label>
	            </td>
	            <td><?php 
        echo $lists['security_anti_leech'];
        ?>
</td>
	        </tr>
	        <tr>
	            <td class="key">
	            	<label class="hasTip" title="<?php 
        echo _DML_CFG_ALLOWEDHOSTS . '::' . _DML_CFG_ALLOWEDHOSTSTT;
        ?>
"><?php 
        echo _DML_CFG_ALLOWEDHOSTS;
        ?>
</label>
	            </td>
	            <td><input type="text" name="security_allowed_hosts" value="<?php 
        echo $_DOCMAN->getCfg('security_allowed_hosts', $_SERVER["HTTP_HOST"]);
        ?>
" /></td>
	            <td>
	            <input type="button" value="<?php 
        echo _DML_RESETDEFAULT;
        ?>
" name="Reset" onclick="document.adminForm.security_allowed_hosts.value='<?php 
        echo $_SERVER['HTTP_HOST'];
        ?>
';" />
	            </td>
	        </tr>
	        <tr>
	            <td class="key">
	            	<label class="hasTip" title="<?php 
        echo _DML_CFG_LOG . '::' . _DML_CFG_LOGTT;
        ?>
"><?php 
        echo _DML_CFG_LOG;
        ?>
</label>
	            </td>
	            <td><?php 
        echo $lists['log'];
        ?>
</td>
	        </tr>
	        <tr>
	            <td class="key">
	            	<label class="hasTip" title="<?php 
        echo _DML_CFG_HIDE_REMOTE . '::' . _DML_CFG_HIDE_REMOTETT;
        ?>
"><?php 
        echo _DML_CFG_HIDE_REMOTE;
        ?>
</label>
	            </td>
	            <td><?php 
        echo $lists['hide_remote'];
        ?>
</td>
	        </tr>
	    </table>
	    </fieldset>

        <?php 
        echo $tabs->endPanel();
        echo $tabs->endPane();
        ?>
        <input type="hidden" name="id" value="" />
        <input type="hidden" name="task" value="" />
        <input type="hidden" name="option" value="com_docman" />
        <input type="hidden" name="section" value="config" />
        <input type="hidden" name="docman_version" value="<?php 
        echo _DM_VERSION;
        ?>
" />
        <?php 
        echo DOCMAN_token::render();
        ?>
    </form>

    <?php 
        include_once JPATH_SITE . DS . 'components' . DS . 'com_docman' . DS . 'footer.php';
        ?>

    <?php 
    }
Example #5
0
    function copyDocumentForm($cid, &$lists, &$items)
    {
        global $mosConfig_absolute_path;
        ?>
        <?php 
        dmHTML::adminHeading(_DML_COPYTOCAT, 'categories');
        ?>

        <form action="index2.php" method="post" name="adminForm" class="adminform" id="dm_moveform">
        <table class="adminform">
        <tr>
            <td align="left" valign="middle" width="10%">
            <strong><?php 
        echo _DML_COPYTOCAT;
        ?>
</strong>
            <?php 
        echo $lists['categories'];
        ?>
            </td>
            <td align="left" valign="top" width="20%">
            <strong><?php 
        echo _DML_DOCSCOPIED;
        ?>
</strong>
            <?php 
        echo "<ol>";
        foreach ($items as $item) {
            echo "<li>" . $item->dmname . "</li>";
        }
        echo "</ol>";
        ?>
            </td>
        </tr>
        </table>
        <input type="hidden" name="option" value="com_docman" />
        <input type="hidden" name="section" value="documents" />
        <input type="hidden" name="task" value="copy_process" />
        <input type="hidden" name="boxchecked" value="1" />
        <?php 
        foreach ($cid as $id) {
            echo "\n <input type=\"hidden\" name=\"cid[]\" value=\"{$id}\" />";
        }
        ?>
        <?php 
        echo DOCMAN_token::render();
        ?>
        </form>
        <?php 
        include_once $mosConfig_absolute_path . "/components/com_docman/footer.php";
    }
Example #6
0
function fetchMoveDocumentForm($uid)
{
    global $database, $_DMUSER;
    $doc = new mosDMDocument($database);
    $doc->load($uid);
    //check user permissions
    $err = $_DMUSER->canPreformTask($doc, 'Move');
    if ($err) {
        _returnTo('cat_view', $err, $doc->catid);
    }
    $doc = new DOCMAN_Document($uid);
    // category select list
    $options = array(mosHTML::makeOption('0', _DML_SELECT_CAT));
    $lists['categories'] = dmHTML::categoryList($doc->getData('catid'), "", $options);
    return HTML_DMDocuments::moveDocumentForm($lists, $doc->getLinkObject(), $doc->getPathObject(), $doc->getDataObject());
}
Example #7
0
function editCategory($section = '', $uid = 0)
{
    $my = JFactory::getUser();
    $database = JFactory::getDBO();
    $mainframe = JFactory::getApplication();
    // disable the main menu to force user to use buttons
    $_REQUEST['hidemainmenu'] = 1;
    $type = JRequest::getCmd('type', '');
    $redirect = JRequest::getCmd('section', '', 'post');
    $row = new mosDMCategory($database);
    // load the row from the db table
    $row->load($uid);
    // fail if checked out not by 'me'
    if ($row->checked_out && $row->checked_out != $my->id) {
        $mainframe->redirect('index.php?option=com_docman&task=categories', 'The category ' . $row->title . ' is currently being edited by another administrator');
    }
    if ($uid) {
        // existing record
        $row->checkout($my->id);
        // code for Link Menu
    } else {
        // new record
        $row->section = $section;
        $row->published = 1;
    }
    // make order list
    $order = array();
    $database->setQuery("SELECT COUNT(*) FROM #__categories WHERE section='{$row->section}'");
    $max = intval($database->loadResult()) + 1;
    for ($i = 1; $i < $max; $i++) {
        $order[] = JHTML::_('select.option', $i);
    }
    // build the html select list for ordering
    $query = "SELECT ordering AS value, title AS text" . "\n FROM #__categories" . "\n WHERE section = '{$row->section}'" . "\n ORDER BY ordering";
    $lists['ordering'] = JHTML::_('list.specificordering', $row, $uid, $query);
    // build the select list for the image positions
    $active = $row->image_position ? $row->image_position : 'left';
    $lists['image_position'] = JHTML::_('list.positions', 'image_position', $active, null, 0, 0);
    // Imagelist
    $lists['image'] = dmHTML::imageList('image', $row->image);
    // build the html select list for the group access
    $lists['access'] = JHTML::_('list.accesslevel', $row);
    // build the html radio buttons for published
    $lists['published'] = JHTML::_('select.booleanlist', 'published', 'class="inputbox"', $row->published);
    // build the html select list for paraent item
    $options = array();
    $options[] = JHTML::_('select.option', '0', _DML_TOP);
    $lists['parent'] = dmHTML::categoryParentList($row->id, "", $options);
    HTML_DMCategories::edit($row, $section, $lists, $redirect);
}
Example #8
0
function copyDocumentForm($cid)
{
    $database = JFactory::getDBO();
    if (!is_array($cid) || count($cid) < 1) {
        echo "<script> alert('" . _DML_SELECT_ITEM_COPY . "'); window.history.go(-1);</script>\n";
        exit;
    }
    // query to list items from documents
    $cids = implode(',', $cid);
    $query = "SELECT dmname FROM #__docman WHERE id IN ( " . $cids . " ) ORDER BY id, dmname";
    $database->setQuery($query);
    $items = $database->loadObjectList();
    // category select list
    $options = array(JHTML::_('select.option', '1', _DML_SELECT_CAT));
    $lists['categories'] = dmHTML::categoryList("", "", $options);
    HTML_DMDocuments::copyDocumentForm($cid, $lists, $items);
}
Example #9
0
function editCategory($section = '', $uid = 0)
{
    global $database, $my;
    global $mosConfig_absolute_path, $mosConfig_live_site;
    // disable the main menu to force user to use buttons
    $_REQUEST['hidemainmenu'] = 1;
    $type = mosGetParam($_REQUEST, 'type', '');
    $redirect = mosGetParam($_POST, 'section', '');
    $row = new mosDMCategory($database);
    // load the row from the db table
    $row->load($uid);
    // fail if checked out not by 'me'
    if ($row->checked_out && $row->checked_out != $my->id) {
        mosRedirect('index2.php?option=com_docman&task=categories', 'The category ' . $row->title . ' is currently being edited by another administrator');
    }
    if ($uid) {
        // existing record
        $row->checkout($my->id);
        // code for Link Menu
    } else {
        // new record
        $row->section = $section;
        $row->published = 1;
    }
    // make order list
    $order = array();
    $database->setQuery("SELECT COUNT(*) FROM #__categories WHERE section='{$row->section}'");
    $max = intval($database->loadResult()) + 1;
    for ($i = 1; $i < $max; $i++) {
        $order[] = mosHTML::makeOption($i);
    }
    // build the html select list for ordering
    $query = "SELECT ordering AS value, title AS text" . "\n FROM #__categories" . "\n WHERE section = '{$row->section}'" . "\n ORDER BY ordering";
    $lists['ordering'] = mosAdminMenus::SpecificOrdering($row, $uid, $query);
    // build the select list for the image positions
    $active = $row->image_position ? $row->image_position : 'left';
    $lists['image_position'] = mosAdminMenus::Positions('image_position', $active, null, 0, 0);
    // Imagelist
    $lists['image'] = dmHTML::imageList('image', $row->image);
    // build the html select list for the group access
    $lists['access'] = mosAdminMenus::Access($row);
    // build the html radio buttons for published
    $lists['published'] = mosHTML::yesnoRadioList('published', 'class="inputbox"', $row->published);
    // build the html select list for paraent item
    $options = array();
    $options[] = mosHTML::makeOption('0', _DML_TOP);
    $lists['parent'] = dmHTML::categoryParentList($row->id, "", $options);
    HTML_DMCategories::edit($row, $section, $lists, $redirect);
}
    function editCSSSource($theme, &$content)
    {
        global $_DOCMAN;
        ?>
		<form action="index.php" method="post" name="adminForm">

        <?php 
        dmHTML::adminHeading(_DML_STYLESHEET_EDITOR, 'templates');
        ?>


		<table class="adminform">
		<tr>
			<th colspan="4">
			<?php 
        echo _DML_PATH;
        ?>
: <?php 
        echo $_DOCMAN->getPath('themes', $theme);
        ?>
/css/theme.css
			<?php 
        $css_path = $file = $_DOCMAN->getPath('themes', $theme) . "/css/theme.css";
        echo is_writable($css_path) ? '<b><font color="green">
			 - ' . _DML_WRITABLE . '</font></b>' : '<b><font color="red"> - ' . _DML_UNWRITABLE . '</font></b>';
        ?>
			</th>
		</tr>
		<tr>
			<td>
			<textarea style="width:99%" rows="25" name="filecontent" class="inputbox"><?php 
        echo $content;
        ?>
</textarea>
			</td>
		</tr>
		</table>
		<input type="hidden" name="theme" value="<?php 
        echo $theme;
        ?>
" />
		<input type="hidden" name="option" value="com_docman" />
		<input type="hidden" name="section" value="themes" />
		<input type="hidden" name="task" value="" />
        <?php 
        echo DOCMAN_token::render();
        ?>
		</form>
		<?php 
        include_once JPATH_SITE . DS . 'components' . DS . 'com_docman' . DS . 'footer.php';
    }
Example #11
0
function uploadWizard($step = 1, $method = 'http', $old_filename)
{
    global $_DOCMAN;
    $mainframe = JFactory::getApplication();
    $database = JFactory::getDBO();
    switch ($step) {
        case 1:
            $lists['methods'] = dmHTML::uploadSelectList($method);
            HTML_DMFiles::uploadWizard($lists);
            break;
        case 2:
            switch ($method) {
                case 'http':
                    HTML_DMFiles::uploadWizard_http($old_filename);
                    break;
                case 'ftp':
                    HTML_DMFiles::uploadWizard_ftp();
                    break;
                case 'link':
                    $mainframe->redirect("index.php?option=com_docman&section=documents&task=new&makelink=1", _DML_CREATEALINK);
                    // HTML_DMFiles::uploadWizard_link();
                    break;
                case 'transfer':
                    HTML_DMFiles::uploadWizard_transfer();
                    break;
                default:
                    $mainframe->redirect("index.php?option=com_docman&section=files", _DML_SELECTMETHODFIRST);
            }
            break;
        case 3:
            DOCMAN_token::check() or die('Invalid Token');
            switch ($method) {
                case 'http':
                    $path = $_DOCMAN->getCfg('dmpath');
                    $upload = new DOCMAN_FileUpload();
                    $file_upload = JRequest::getVar('upload', '', 'files', 'array');
                    $result =& $upload->uploadHTTP($file_upload, $path, _DM_VALIDATE_ADMIN);
                    if (!$result) {
                        $mainframe->redirect("index.php?option=com_docman&section=files", _DML_ERROR_UPLOADING . " - " . $upload->_err);
                    } else {
                        $batch = JRequest::getCmd('batch', null);
                        if ($batch && $old_filename != null) {
                            require_once JPATH_ADMINISTRATOR . DS . 'includes' . DS . 'pcl' . DS . 'pclzip.lib.php';
                            if (!extension_loaded('zlib')) {
                                $mainframe->redirect("index.php?option=com_docman&section=files", _DML_ZLIB_ERROR);
                            }
                            $target_directory = $_DOCMAN->getCfg('dmpath');
                            $zip = new PclZip($target_directory . DS . $result->name);
                            $file_to_unzip = preg_replace('/(.+)\\..*$/', '$1', $target_directory . DS . $result->name);
                            if (!$zip->extract($target_directory)) {
                                $mainframe->redirect("index.php?option=com_docman&section=files", _DML_UNZIP_ERROR);
                            }
                            @unlink($target_directory . DS . $result->name);
                        }
                        if ($old_filename && $old_filename != $file_upload['name']) {
                            $file = $_DOCMAN->getCfg('dmpath') . DS . $old_filename;
                            @unlink($file);
                            $database->setQuery("UPDATE #__docman SET dmfilename='" . $database->getEscaped($result->name) . "' WHERE dmfilename='" . $database->getEscaped($old_filename) . "'");
                            if (!$database->query()) {
                                echo "<script> alert('" . $database->getErrorMsg() . "'); window.history.go(-1);</script>\n";
                                exit;
                            }
                        }
                        //HTML_DMFiles::uploadWizard_sucess($result, $batch, $old_filename);
                        $mainframe->redirect("index.php?option=com_docman&section=files&task=upload&step=4" . "&result=" . urlencode($result->name) . "&batch=" . (0 + $batch) . "&old_filename=" . $old_filename, _DML_SUCCESS . ' &quot;' . $result->name . '&quot; - ' . _DML_FILEUPLOADED);
                    }
                    break;
                case 'ftp':
                    break;
                case 'link':
                    break;
                case 'transfer':
                    $url = stripslashes(JRequest::getString('url', null, 'post'));
                    $name = stripslashes(JRequest::getString('localfile', null, 'post'));
                    $path = $_DOCMAN->getCfg('dmpath') . DS;
                    $upload = new DOCMAN_FileUpload();
                    $result = $upload->uploadURL($url, $path, _DM_VALIDATE_ADMIN, $name);
                    if ($result) {
                        // HTML_DMFiles::uploadWizard_sucess($result, 0, 1);
                        $mainframe->redirect("index.php?option=com_docman&section=files&task=upload&step=4" . "&result=" . urlencode($result->name) . "&batch=0&old_filename=1", _DML_SUCCESS . ' &quot;' . $result->name . '&quot; - ' . _DML_FILEUPLOADED);
                    } else {
                        $mainframe->redirect("index.php?option=com_docman&section=files", $upload->_err);
                    }
                    break;
            }
            break;
        case '4':
            /* New step that gives us a header completion message rather than
            		   "in body" completion. For uniformity
            		 */
            $file = new StdClass();
            $file->name = urlencode(stripslashes(JRequest::getString('result', 'INTERNAL ERROR')));
            $batch = JRequest::getInt('batch', 0);
            $old_filename = JRequest::getString('old_filename', null);
            HTML_DMFiles::uploadWizard_sucess($file, $batch, $old_filename, 0);
            break;
    }
    //End switch($step)
}
Example #12
0
    function showStatistics(&$row)
    {
        global $mosConfig_absolute_path;
        ?>
       <form action="index2.php?option=com_docman" method="post" name="adminForm" id="adminForm">

        <?php 
        dmHTML::adminHeading(_DML_DOCSTATS, 'stats');
        ?>

        <table class="adminlist" width="98%" cellspacing="2" cellpadding="2" border="0" align="center">
            <thead>
            <tr>
                <th class="title" width="15%" align="left"><?php 
        echo _DML_RANK;
        ?>
</td>
                <th class="title" width="60%" align="left"><?php 
        echo _DML_TITLE;
        ?>
</td>
                <th class="title" width="25%" align="left"><?php 
        echo _DML_DOWNLOADS;
        ?>
</td>
            </tr>
            </thead>

            <tbody>
		<?php 
        $enum = 1;
        $color = 0;
        foreach ($row as $rows) {
            ?>
				<tr class="row<?php 
            echo $color;
            ?>
">
					<td width="15%" align="left"><?php 
            echo $enum;
            ?>
</td>
					 <td width="60%" align="left"><?php 
            echo $rows->dmname;
            ?>
</td>
					 <td width="25%" align="left"><b><?php 
            echo $rows->dmcounter;
            ?>
</b></td>
				</tr>
				<?php 
            if (!$color) {
                $color = 1;
            } else {
                $color = 0;
            }
            $enum++;
        }
        ?>
        </tbody>
		</table>
		<input type="hidden" name="task" value="">
        <input type="hidden" name="option" value="com_docman">
		</form>

        <?php 
        include_once $mosConfig_absolute_path . "/components/com_docman/footer.php";
    }
    function messageForm($group, $list)
    {
        ?>
        <form action="index.php" name="adminForm" method="POST">
        <?php 
        dmHTML::adminHeading(_DML_EMAIL_GROUP, 'sendemail');
        ?>

        <table cellpadding="5" cellspacing="1" border="0" width="100%" class="adminform">
            <tr>
                <td width="150"><?php 
        echo _DML_GROUP;
        ?>
:</td>
                <td width="85%"><?php 
        echo $group->groups_name;
        ?>
</td>
			</tr>
            <tr>
                <td width="150"><?php 
        echo _DML_SUBJECT;
        ?>
:</td>
                <td width="85%"><input class="inputbox" type="text" name="mm_subject" value="" size="50"></td>
            </tr>
            <tr>
                <td width="150"><?php 
        echo _DML_EMAIL_LEADIN;
        ?>
:</td>
                <td width="85%"><textarea cols="50" rows="2" name="mm_leadin" wrap="virtual"
					class="inputbox"><?php 
        echo $list['leadin'];
        ?>
</textarea></td>
			</tr>
            <tr>
                <td width="150" valign="top"><?php 
        echo _DML_MESSAGE;
        ?>
:</td>
                <td width="85%"><textarea cols="50" rows="5" name="mm_message" wrap="virtual" class="inputbox"></textarea></td>
            </tr>
        </table>
        <!--<input type="submit" name="submit" value="<?php 
        echo _DML_SEND_EMAIL;
        ?>
">-->
        <input type="hidden" name="option" value="com_docman" />
        <input type="hidden" name="section" value="groups" />
        <input type="hidden" name="task" value="" />
        <input type="hidden" name="gid" value="<?php 
        echo $group->groups_id;
        ?>
" />
        <?php 
        echo DOCMAN_token::render();
        ?>
        </form>
        <?php 
        include_once JPATH_SITE . DS . 'components' . DS . 'com_docman' . DS . 'footer.php';
    }
Example #14
0
    /**
     * Writes the edit form for new and existing categories
     *
     * @param mosCategory $ The category object
     * @param string $
     * @param array $
     */
    function edit(&$row, $section, &$lists, $redirect)
    {
        global $mosConfig_live_site, $mosConfig_absolute_path;
        if ($row->image == "") {
            $row->image = 'blank.png';
        }
        mosMakeHtmlSafe($row, ENT_QUOTES, 'description');
        ?>
		<script language="javascript" type="text/javascript">
		function submitbutton(pressbutton, section) {
			var form = document.adminForm;
			if (pressbutton == 'cancel') {
				submitform( pressbutton );
				return;
			}

			if ( form.name.value == "" ) {
				alert('<?php 
        echo _DML_CAT_MUST_SELECT_NAME;
        ?>
');
			} else {
				<?php 
        getEditorContents('editor1', 'description');
        ?>
				submitform(pressbutton);
			}
		}
		</script>

		<form action="index2.php" method="post" name="adminForm">

        <?php 
        $tmp = ($row->id ? _DML_EDIT : _DML_ADD) . ' ' . _DML_CAT . ' ' . $row->name;
        dmHTML::adminHeading($tmp, 'categories');
        ?>

		<table width="100%">
		<tr>
			<td valign="top">
				<table class="adminform">
				<tr>
					<th colspan="3">
					<?php 
        echo _DML_CATDETAILS;
        ?>
					</th>
				<tr>
				<tr>
					<td>
					<?php 
        echo _DML_CATTITLE;
        ?>
:
					</td>
					<td colspan="2">
					<input class="text_area" type="text" name="title" value="<?php 
        echo $row->title;
        ?>
" size="50" maxlength="50" title="A short name to appear in menus" />
					</td>
				</tr>
				<tr>
					<td>
					<?php 
        echo _DML_CATNAME;
        ?>
:
					</td>
					<td colspan="2">
					<input class="text_area" type="text" name="name" value="<?php 
        echo $row->name;
        ?>
" size="50" maxlength="255" title="<?php 
        echo _DML_LONGNAME;
        ?>
" />
					</td>
				</tr>
				<tr>
					<td align="right"><?php 
        echo _DML_PARENTITEM;
        ?>
:</td>
					<td>
					<?php 
        echo $lists['parent'];
        ?>
					</td>
				</tr>
				<tr>
					<td>
					<?php 
        echo _DML_IMAGE;
        ?>
:
					</td>
					<td>
					<?php 
        echo $lists['image'];
        ?>
					</td>
					<td rowspan="4" width="50%">
					<script language="javascript" type="text/javascript">
					if (document.forms[0].image.options.value!=''){
					  jsimg='../images/stories/' + getSelectedValue( 'adminForm', 'image' );
					} else {
					  jsimg='../images/M_images/blank.png';
					}
					document.write('<img src=' + jsimg + ' name="imagelib" width="80" height="80" border="2" alt="<?php 
        echo _DML_PREVIEW;
        ?>
" />');
					</script>
					</td>
				</tr>
				<tr>
					<td>
					<?php 
        echo _DML_IMAGEPOS;
        ?>
:
					</td>
					<td>
					<?php 
        echo $lists['image_position'];
        ?>
					</td>
				</tr>
				<tr>
					<td>
					<?php 
        echo _DML_ORDERING;
        ?>
:
					</td>
					<td>
					<?php 
        echo $lists['ordering'];
        ?>
					</td>
				</tr>
				<tr>
					<td>
					<?php 
        echo _DML_ACCESSLEVEL;
        ?>
:
					</td>
					<td>
					<?php 
        echo $lists['access'];
        ?>
					</td>
				</tr>
				<tr>
					<td>
					<?php 
        echo _DML_PUBLISHED;
        ?>
:
					</td>
					<td>
					<?php 
        echo $lists['published'];
        ?>
					</td>
				</tr>
				<tr>
					<td valign="top">
					<?php 
        echo _DML_DESCRIPTION;
        ?>
:
					</td>
					<td colspan="2">
					<?php 
        // parameters : areaname, content, hidden field, width, height, rows, cols
        DOCMAN_Compat::editorArea('editor1', $row->description, 'description', '500', '200', '50', '5');
        ?>
					</td>
				</tr>
				</table>
			</td>
        </tr>
		</table>

		<input type="hidden" name="option" value="com_docman" />
		<input type="hidden" name="section" value="categories" />
		<input type="hidden" name="task" value="" />
		<input type="hidden" name="oldtitle" value="<?php 
        echo $row->title;
        ?>
" />
		<input type="hidden" name="id" value="<?php 
        echo $row->id;
        ?>
" />
		<input type="hidden" name="sectionid" value="com_docman" />
		<input type="hidden" name="redirect" value="<?php 
        echo $redirect;
        ?>
" />
        <?php 
        echo DOCMAN_token::render();
        ?>
		</form>
        <?php 
        include_once $mosConfig_absolute_path . "/components/com_docman/footer.php";
    }
Example #15
0
    function showLicenses($option, $rows, $search, $pageNav)
    {
        global $database, $my, $mosConfig_absolute_path, $mosConfig_live_site;
        ?>
		<form action="index2.php" method="post" name="adminForm">
        <?php 
        dmHTML::adminHeading(_DML_LICENSES, 'licenses');
        ?>
        <div class="dm_filters">
            <?php 
        echo _DML_FILTER_NAME;
        ?>
            <input type="text" name="search" value="<?php 
        echo $search;
        ?>
" class="inputbox" onChange="document.adminForm.submit();" />
        </div>

		<table cellpadding="4" cellspacing="0" border="0" width="100%" class="adminlist">
            <thead>
			<tr>
				<th width="2%" class="title"><input type="checkbox" name="toggle" value="" onclick="checkAll(<?php 
        echo count($rows);
        ?>
);" /></th>
				<th class="title" width="30%" nowrap="nowrap"><div align="left"><?php 
        echo _DML_NAME;
        ?>
</div></th>
                <th class="title" width="68%"><div align="left"><?php 
        echo _DML_LICENSE_TEXT;
        ?>
</div></th>
			</tr>
            </thead>

            <tfoot><tr><td colspan="11"><?php 
        echo $pageNav->getListFooter();
        ?>
</td></tr></tfoot>

            <tbody>
		   <?php 
        $k = 0;
        for ($i = 0, $n = count($rows); $i < $n; $i++) {
            $row =& $rows[$i];
            echo "<tr class=\"row{$k}\">";
            echo "<td width=\"20\">";
            ?>
    					<input type="checkbox" id="cb<?php 
            echo $i;
            ?>
" name="cid[]" value="<?php 
            echo $row->id;
            ?>
" onclick="isChecked(this.checked);" />
    					</td>
    					<td align="left">
    						<a href="#edit" onclick="return listItemTask('cb<?php 
            echo $i;
            ?>
','edit')">
    						<?php 
            echo $row->name;
            ?>
    						</a>
    					</td>
                        <td align="left">
                            <?php 
            echo $row->license;
            ?>
                        </td>
    				</tr>
    				<?php 
            $k = 1 - $k;
        }
        ?>
            </tbody>
		  </table>


		  <input type="hidden" name="option" value="com_docman" />
		  <input type="hidden" name="section" value="licenses" />
		  <input type="hidden" name="task" value="licenses" />
		  <input type="hidden" name="boxchecked" value="0" />
          <?php 
        echo DOCMAN_token::render();
        ?>
		</form>
	  <?php 
        include_once $mosConfig_absolute_path . "/components/com_docman/footer.php";
    }
Example #16
0
    function showLogs($option, $rows, $search, $pageNav)
    {
        global $database, $my, $mosConfig_absolute_path, $mosConfig_live_site;
        ?>
		<form action="index2.php" method="post" name="adminForm">
        <?php 
        dmHTML::adminHeading(_DML_DOWNLOAD_LOGS, 'logs');
        ?>
			<div class="dm_filters">
                <?php 
        echo _DML_FILTER;
        ?>
				<input type="text" name="search" value="<?php 
        echo $search;
        ?>
" class="inputbox" onChange="document.adminForm.submit();" />
            </div>
			<table cellpadding="4" cellspacing="0" border="0" width="100%" class="adminlist">
            <thead>
				<tr>
					<th width="2%" class="title"><input type="checkbox" name="toggle" value="" onclick="checkAll(<?php 
        echo count($rows);
        ?>
);" /></th>
					<th class="title" width="10%" nowrap="nowrap"><div align="center"><?php 
        echo _DML_DATE;
        ?>
</div></th>
					<th class="title" width="20%" nowrap="nowrap"><div align="center"><?php 
        echo _DML_USER;
        ?>
</div></th>
					<th class="title" width="20%" nowrap="nowrap"><div align="center"><?php 
        echo _DML_IP;
        ?>
</div></th>
					<th class="title" width="20%" nowrap="nowrap"><div align="center"><?php 
        echo _DML_DOCUMENT;
        ?>
</div></th>
					<th class="title" width="10%" nowrap="nowrap"><div align="center"><?php 
        echo _DML_BROWSER;
        ?>
</div></th>
					<th class="title" width="10%" nowrap="nowrap"><div align="center"><?php 
        echo _DML_OS;
        ?>
</div></th>
				</tr>
             </thead>

             <tfoot><tr><td colspan="11"><?php 
        echo $pageNav->getListFooter();
        ?>
</td></tr></tfoot>

             <tbody>

				<?php 
        $k = 0;
        for ($i = 0, $n = count($rows); $i < $n; $i++) {
            $row =& $rows[$i];
            echo "<tr class=\"row{$k}\">";
            echo "<td width=\"20\">";
            ?>

			<input type="checkbox" id="cb<?php 
            echo $i;
            ?>
" name="cid[]" value="<?php 
            echo $row->id;
            ?>
" onclick="isChecked(this.checked);" />
					</td>
					<td align="center">
						<?php 
            echo $row->log_datetime;
            ?>
					</td>
					<td align="center">
						<?php 
            echo $row->user;
            ?>
					</td>
					<td align="center">
						<a href="http://ws.arin.net/cgi-bin/whois.pl?queryinput=<?php 
            echo $row->log_ip;
            ?>
" target="_blank"><?php 
            echo $row->log_ip;
            ?>
</a>
					</td>
					<td align="center">
						 <?php 
            echo $row->dmname;
            ?>
					</td>
					<td align="center">
						 <?php 
            echo $row->log_browser;
            ?>
					</td>
					<td align="center">
						 <?php 
            echo $row->log_os;
            ?>
					</td>
				</tr>
				<?php 
            $k = 1 - $k;
        }
        ?>
        </tbody>
		</table>

		<input type="hidden" name="option" value="com_docman" />
		<input type="hidden" name="section" value="logs" />
		<input type="hidden" name="task" value="" />
		<input type="hidden" name="boxchecked" value="0" />
        <?php 
        echo DOCMAN_token::render();
        ?>
		</form>

		<?php 
        include_once $mosConfig_absolute_path . "/components/com_docman/footer.php";
    }
Example #17
0
    function uploadWizard_sucess(&$file, $batch = 0, $old_filename = null, $show_completion = 1)
    {
        global $mosConfig_live_site;
        if ($old_filename != '1') {
            mosredirect("index2.php?option=com_docman&section=files", "&quot;" . $old_filename . "&quot; - " . _DML_DOCUPDATED);
        }
        ?>

        <?php 
        dmHTML::adminHeading(_DML_UPLOADWIZARD, 'files');
        ?>


        <table cellpadding="4" cellspacing="0" border="0" width="100%" class="adminform">
  		<?php 
        if ($show_completion) {
            /* backwards compatible */
            ?>
        <tr>
          <td width="38%" align="center">
          	<div align="right">
          		<img src="<?php 
            echo $mosConfig_live_site;
            ?>
/administrator/components/com_docman/images/dm_upload_48.png" />
          	</div>
          </td>
          <td colspan="2"><div align="left">'<?php 
            echo $file->name;
            ?>
' -<?php 
            echo _DML_FILEUPLOADED;
            ?>
</div></td>
        </tr>
	<tr>
	  <td colspan=2><div align="center"><hr /></td>
	<tr>
	<?php 
        }
        ?>

	<!-- Give them a nice sub menu -->
  	<?php 
        if (!$batch && $old_filename == '1') {
            /* Can't create docs from a batch or existing file */
            ?>
    	<tr>
    		<td>
    		<div align="right">
    			<a href="index2.php?option=com_docman&section=documents&task=new&uploaded_file=<?php 
            echo $file->name;
            ?>
">
    			<img src="<?php 
            echo $mosConfig_live_site;
            ?>
/administrator/images/edit_f2.png" border="0">
    			</a>
    		</div>
    		</td>

    		<td>
    		<div align="left"><?php 
            echo _DML_MAKENEWENTRY;
            ?>
</div>
    		</td>
    	</tr>
    	<?php 
        }
        ?>

    <tr>

	<td>
		<div align="right">
			<a href="index2.php?option=com_docman&section=files&task=upload">
			<img src="<?php 
        echo $mosConfig_live_site;
        ?>
/administrator/images/upload_f2.png" border="0">
			</a>
		</div>
	</td>
	<td><div align="left"><?php 
        echo _DML_UPLOADMORE;
        ?>
</div></td>
	</tr>
	<tr>
		<td>
			<div align="right">
				<a href="index2.php?option=com_docman&section=files">
					<img src="<?php 
        echo $mosConfig_live_site;
        ?>
/administrator/images/next_f2.png" border="0">
				</a>
			</div>
		</td>
		<td>
			<div align="left"><?php 
        echo _DML_DISPLAYFILES;
        ?>
</div>
		</td>
	</tr>
	</table>

	<form action="index2.php" method="post" name="adminForm">
        <input type="hidden" name="option" value="com_docman" />
        <input type="hidden" name="section" value="files" />
        <input type="hidden" name="task" value="" />
        <input type="hidden" name="boxchecked" value="0" />
    </form>
	<?php 
    }
Example #18
0
    /**
     * Writes the edit form for new and existing categories
     *
     * @param mosCategory $ The category object
     * @param string $
     * @param array $
     */
    function edit(&$row, $section, &$lists, $redirect)
    {
        if ($row->image == "") {
            $row->image = 'blank.png';
        }
        JFilterOutput::objectHTMLSafe($row, ENT_QUOTES, 'description');
        jimport('joomla.html.editor');
        $editor =& JFactory::getEditor();
        ?>
		<script language="javascript" type="text/javascript">
		function submitbutton(pressbutton, section) {
			var form = document.adminForm;
			if (pressbutton == 'cancel') {
				submitform( pressbutton );
				return;
			}

			if ( form.name.value == "" || form.title.value == "") {
				alert('<?php 
        echo _DML_CAT_MUST_SELECT_NAME;
        ?>
');
			} else {
				<?php 
        echo $editor->save('description');
        ?>
				submitform(pressbutton);
			}
		}
		</script>

		<form action="index.php" method="post" name="adminForm">

        <?php 
        $tmp = ($row->id ? _DML_EDIT : _DML_ADD) . ' ' . _DML_CAT . ' ' . $row->name;
        dmHTML::adminHeading($tmp, 'categories');
        ?>
		<div class="col width-50">
			<fieldset class="adminform">
				<legend><?php 
        echo _DML_CATDETAILS;
        ?>
</legend>
			
				<table class="admintable">
				<tr>
					<td class="key"><label><?php 
        echo _DML_CATTITLE;
        ?>
:</label></td>
					<td colspan="2">
						<input class="text_area" type="text" name="title" value="<?php 
        echo $row->title;
        ?>
" size="50" maxlength="50" title="A short name to appear in menus" />
					</td>
				</tr>
				<tr>
					<td class="key"><?php 
        echo _DML_CATNAME;
        ?>
:</td>
					<td colspan="2">
						<input class="text_area" type="text" name="name" value="<?php 
        echo $row->name;
        ?>
" size="50" maxlength="255" title="<?php 
        echo _DML_LONGNAME;
        ?>
" />
					</td>
				</tr>
				<tr>
					<td class="key"><?php 
        echo _DML_PARENTITEM;
        ?>
:</td>
					<td><?php 
        echo $lists['parent'];
        ?>
</td>
				</tr>
				<tr>
					<td class="key"><?php 
        echo _DML_IMAGE;
        ?>
:</td>
					<td><?php 
        echo $lists['image'];
        ?>
<br /><br />
					
						<script language="javascript" type="text/javascript">
						if (document.forms[0].image.options.value!=''){
						  jsimg='../images/stories/' + getSelectedValue( 'adminForm', 'image' );
						} else {
						  jsimg='../images/M_images/blank.png';
						}
						document.write('<img src=' + jsimg + ' name="imagelib" width="80" height="80" border="2" alt="<?php 
        echo _DML_PREVIEW;
        ?>
" />');
						</script>
					</td>
				</tr>
				<tr>
					<td class="key"><?php 
        echo _DML_IMAGEPOS;
        ?>
:</td>
					<td><?php 
        echo $lists['image_position'];
        ?>
</td>
				</tr>
				<tr>
					<td class="key"><?php 
        echo _DML_ORDERING;
        ?>
:</td>
					<td><?php 
        echo $lists['ordering'];
        ?>
</td>
				</tr>
				<tr>
					<td class="key"><?php 
        echo _DML_ACCESSLEVEL;
        ?>
:</td>
					<td><?php 
        echo $lists['access'];
        ?>
</td>
				</tr>
				<tr>
					<td class="key"><?php 
        echo _DML_PUBLISHED;
        ?>
:</td>
					<td><?php 
        echo $lists['published'];
        ?>
</td>
				</tr>
				</table>
			</fieldset>
		</div>
		<div class="col width-50">
			<fieldset class="adminform">
				<legend><?php 
        echo _DML_DESCRIPTION;
        ?>
</legend>
				<?php 
        // parameters : areaname, content, hidden field, width, height, rows, cols
        DOCMAN_Compat::editorArea('editor1', $row->description, 'description', '440', '282', '50', '5');
        ?>
			</fieldset>
		</div>
		<div style="clear: both;"></div>

		<input type="hidden" name="option" value="com_docman" />
		<input type="hidden" name="section" value="categories" />
		<input type="hidden" name="task" value="" />
		<input type="hidden" name="oldtitle" value="<?php 
        echo $row->title;
        ?>
" />
		<input type="hidden" name="id" value="<?php 
        echo $row->id;
        ?>
" />
		<input type="hidden" name="sectionid" value="com_docman" />
		<input type="hidden" name="redirect" value="<?php 
        echo $redirect;
        ?>
" />
        <?php 
        echo DOCMAN_token::render();
        ?>
		</form>
        <?php 
        include_once JPATH_ROOT . "/components/com_docman/footer.php";
    }