コード例 #1
0
ファイル: indexMedia.php プロジェクト: noveopiu/dCTL
                    //permessi per poterci sovrascrivere/scaricare
                    $updateDone = true;
                    $resultMsg .= '<span class="ok">OK: ho caricato il file "' . strtoupper($fileNameUpload) . '" in "' . strtoupper(dirname(str_ireplace($ftp_path, '', $pathToUpload))) . '".</span><br />';
                    if ($isMedia) {
                        $resultMsg .= '<form action="javascript:void(0);">';
                        $theCode = 'img://' . $fileNameUpload;
                        $resultMsg .= '<fieldset><label>URI: </label><input name="new_name" onclick="javascript:this.form.new_name.focus();this.form.new_name.select();" class="linkRule" type="text" value="' . $theCode . '" size="' . strlen($theCode) . '"/><label>' . SYS_DBL_SPACE . '
 <span class="help">fai un click sul testo per selezionare tutto l\'identificativo, poi premi command+c o ctrl+c per copiare...</span></label></fieldset></form><br />';
                    }
                    if ($doPreview) {
                        createPreview($pathToUpload, TRUE);
                    }
                    if ($updateDone) {
                        $who = '';
                        $content = array();
                        $isLocked = checkIfLocked($pathToUpload, &$who, &$content);
                        if ($isLocked) {
                            if (is_file($content[0])) {
                                unlink($content[0]);
                            }
                        }
                    }
                } else {
                    $resultMsg .= '<span class="error">ERRORE: non riesco a modificare il file "' . strtoupper($fileNameUpload) . '"... aggiornamento non riuscito.</span><br />';
                }
            } else {
                $resultMsg .= '<span class="error">ERRORE: il file "' . strtoupper($fileNameUpload) . '" non corrisponde a "' . strtoupper($fileToUpload) . '"... aggiornamento non riuscito.</span><br />';
            }
        } else {
            $resultMsg .= '<span class="error">ERRORE: directory "' . strtoupper($dirToUpload) . '" non trovata... aggiornamento non riuscito.</span><br />';
        }
コード例 #2
0
ファイル: admin-edit.php プロジェクト: ariep/ZenPhoto20-DEV
    if (zp_loggedin(MANAGE_ALL_NEWS_RIGHTS)) {
        $additem = gettext('newCategory');
    } else {
        $additem = '';
    }
    $deleteitem = gettext('Category');
    $themepage = 'news';
    $locked = false;
}
if (is_AdminEditPage('page')) {
    $subtab = 'edit';
    $admintype = 'page';
    $additem = gettext('New Page');
    $deleteitem = gettext('Page');
    $themepage = 'pages';
    $locked = !checkIfLocked($result);
}
if (!$result->isMyItem($result->manage_some_rights)) {
    $locked = true;
}
if ($result->transient) {
    if (is_AdminEditPage('newsarticle')) {
        ?>
							<h1><?php 
        echo gettext('New Article');
        ?>
</h1>
							<?php 
    }
    if (is_AdminEditPage('newscategory')) {
        ?>
コード例 #3
0
ファイル: admin-news.php プロジェクト: ariep/ZenPhoto20-DEV
" title="<?php 
    echo gettext('View article');
    ?>
">
											<img src="<?php 
    echo WEBPATH . '/' . ZENFOLDER;
    ?>
/images/view.png" alt="" title="<?php 
    echo gettext('View article');
    ?>
" />
										</a>
									</td>

									<?php 
    if (checkIfLocked($article)) {
        if (extensionEnabled('hitcounter')) {
            ?>
											<td class="page-list_icon">
												<a href="<?php 
            echo $option . $divider;
            ?>
hitcounter=1&amp;titlelink=<?php 
            echo html_encode($article->getTitlelink());
            ?>
&amp;XSRFToken=<?php 
            echo getXSRFToken('hitcounter');
            ?>
" title="<?php 
            echo gettext('Reset hitcounter');
            ?>
コード例 #4
0
ファイル: functions.inc.php プロジェクト: net7/dCTL
function getItemRecord($thePath, &$itemRecord, $theLabel = '')
{
    $itemRecord = array();
    $itemRecord['item_id'] = '';
    $itemRecord['item_short'] = '';
    $itemRecord['item_work'] = '';
    $item_id = basename($thePath);
    $item_id = normalize($item_id);
    $itemRecord['item_id'] = $item_id;
    $item_short = $item_id;
    $itemRecord['item_short'] = $item_short;
    $item_work = $theLabel;
    $itemRecord['item_work'] = cleanWebString($item_work, 18);
    if (checkIfLocked(dirname($thePath), &$who, &$content)) {
        $itemRecord['item_id'] = '';
        $itemRecord['item_work'] = 'in use by ' . $who;
    }
}
コード例 #5
0
ファイル: indexDownload.php プロジェクト: noveopiu/dCTL
     } else {
         $resultMsg = '<span class="error">Nome di file non valido (' . $filePath . ')...' . '</span>';
         header('Location: indexManager.php?' . $_SERVER['QUERY_STRING'] . '&msg=' . urlencode($resultMsg));
         // required
         exit;
     }
     break;
 case $isModel:
     $filePath = getModel($filePath);
     break;
 case $isGenerate:
     $collection_id = basename(dirname($filePath));
     $fName = basename($filePath);
     $filePath = $ftp_path . $collection_id . SYS_PATH_SEP . $fName;
     $content = array();
     $isLocked = checkIfLocked($filePath, &$who, &$content);
     if ($isLocked) {
         $resultMsg = '<span class="error">File già bloccato (' . $filePath . ')...' . '</span>';
         header('Location: indexManager.php?' . $_SERVER['QUERY_STRING'] . '&msg=' . urlencode($resultMsg));
         // required
         exit;
     } else {
         // 				$link_id = preg_replace('/'.DCTL_LINKERSEG.'\.(.*)\.xml/', '$1', $fName);
         // 				$linkerPath = $ftp_path.'/'.$collection_id.'/'.DCTL_FILE_LINKER;
         // 				$templatePath = DCTL_SETTINGS_TEMPLATES_COLLECTION.'/'.DCTL_FILE_LINKERSEG;
         // 				// OTTENGO IL PATH XML
         //	   	forceUTF8($linkerPath);
         // 				$xml = simplexml_load_file($linkerPath, 'SimpleXMLElement', DCTL_XML_LOADER); //
         // 				$namespaces = $xml->getDocNamespaces();
         // 				foreach ($namespaces as $nsk=>$ns) {
         // 					if ($nsk == '') $nsk = 'tei';
コード例 #6
0
/**
 * Prints the table part of a single page item for the sortable pages list
 *
 * @param object $page The array containing the single page
 * @param bool $flag set to true to flag the element as having a problem with nesting level
 */
function printPagesListTable($page, $flag)
{
    if ($flag) {
        $img = '../../images/drag_handle_flag.png';
    } else {
        $img = '../../images/drag_handle.png';
    }
    ?>
	<div class='page-list_row'>
		<div class="page-list_title">
			<?php 
    echo "<a href='admin-edit.php?page&amp;titlelink=" . urlencode($page->getTitlelink()) . "'> ";
    checkForEmptyTitle($page->getTitle(), "page");
    echo "</a>" . checkHitcounterDisplay($page->getHitcounter());
    ?>
		</div>
		<div class="page-list_extra">
			<span>
				<?php 
    echo html_encode($page->getAuthor());
    ?>
			</span>
		</div>
		<div class="page-list_extra">
			<?php 
    printPublished($page);
    ?>
		</div>
		<div class="page-list_extra">
			<?php 
    printExpired($page);
    ?>
		</div>
		<div class="page-list_iconwrapper">
			<div class="page-list_icon">
				<?php 
    if ($page->getPassword()) {
        echo '<img src="../../images/lock.png" style="border: 0px;" alt="' . gettext('Password protected') . '" title="' . gettext('Password protected') . '" />';
    }
    ?>
			</div>
			<div class="page-list_icon">
				<?php 
    echo linkPickerIcon($page);
    ?>
			</div>

			<?php 
    if (checkIfLocked($page)) {
        ?>
				<div class="page-list_icon">
					<?php 
        printPublishIconLink($page, NULL);
        ?>
				</div>
				<div class="page-list_icon">
					<?php 
        if ($page->getCommentsAllowed()) {
            ?>
						<a href="?commentson=0&amp;titlelink=<?php 
            echo html_encode($page->getTitlelink());
            ?>
&amp;XSRFToken=<?php 
            echo getXSRFToken('update');
            ?>
" title="<?php 
            echo gettext('Disable comments');
            ?>
">
							<img src="<?php 
            echo WEBPATH . '/' . ZENFOLDER;
            ?>
/images/comments-on.png" alt="" title="<?php 
            echo gettext("Comments on");
            ?>
" style="border: 0px;"/>
						</a>
						<?php 
        } else {
            ?>
						<a href="?commentson=1&amp;titlelink=<?php 
            echo html_encode($page->getTitlelink());
            ?>
&amp;XSRFToken=<?php 
            echo getXSRFToken('update');
            ?>
" title="<?php 
            echo gettext('Enable comments');
            ?>
">
							<img src="<?php 
            echo WEBPATH . '/' . ZENFOLDER;
            ?>
/images/comments-off.png" alt="" title="<?php 
            echo gettext("Comments off");
            ?>
" style="border: 0px;"/>
						</a>
						<?php 
        }
        ?>
				</div>
				<?php 
    } else {
        ?>
				<div class="page-list_icon">
					<img src="<?php 
        echo WEBPATH . '/' . ZENFOLDER;
        ?>
/images/icon_inactive.png" alt="" title="<?php 
        gettext('locked');
        ?>
" />
				</div>
				<div class="page-list_icon">
					<img src="<?php 
        echo WEBPATH . '/' . ZENFOLDER;
        ?>
/images/icon_inactive.png" alt="" title="<?php 
        gettext('locked');
        ?>
" />
				</div>
				<?php 
    }
    ?>

			<div class="page-list_icon">
				<a href="../../../index.php?p=pages&amp;title=<?php 
    echo js_encode($page->getTitlelink());
    ?>
" title="<?php 
    echo gettext("View page");
    ?>
">
					<img src="<?php 
    echo WEBPATH . '/' . ZENFOLDER;
    ?>
/images/view.png" alt="" title="<?php 
    echo gettext("view");
    ?>
" />
				</a>
			</div>

			<?php 
    if (checkIfLocked($page)) {
        if (extensionEnabled('hitcounter')) {
            ?>
					<div class="page-list_icon">
						<a href="?hitcounter=1&amp;titlelink=<?php 
            echo html_encode($page->getTitlelink());
            ?>
&amp;add&amp;XSRFToken=<?php 
            echo getXSRFToken('hitcounter');
            ?>
" title="<?php 
            echo gettext("Reset hitcounter");
            ?>
">
							<img src="<?php 
            echo WEBPATH . '/' . ZENFOLDER;
            ?>
/images/reset.png" alt="" title="<?php 
            echo gettext("Reset hitcounter");
            ?>
" /></a>
					</div>
					<?php 
        }
        ?>
				<div class="page-list_icon">
					<a href="javascript:confirmDelete('admin-pages.php?delete=<?php 
        echo $page->getTitlelink();
        ?>
&amp;add&amp;XSRFToken=<?php 
        echo getXSRFToken('delete');
        ?>
',deletePage)" title="<?php 
        echo gettext("Delete page");
        ?>
">
						<img src="<?php 
        echo WEBPATH . '/' . ZENFOLDER;
        ?>
/images/fail.png" alt="" title="<?php 
        echo gettext("delete");
        ?>
" /></a>
				</div>
				<div class="page-list_icon">
					<input class="checkbox" type="checkbox" name="ids[]" value="<?php 
        echo $page->getTitlelink();
        ?>
" onclick="triggerAllBox(this.form, 'ids[]', this.form.allbox);" />
				</div>
				<?php 
    } else {
        ?>
				<div class="page-list_icon">
					<img src="<?php 
        echo WEBPATH . '/' . ZENFOLDER;
        ?>
/images/icon_inactive.png" alt="" title="<?php 
        gettext('locked');
        ?>
" />
				</div>
				<div class="page-list_icon">
					<img src="<?php 
        echo WEBPATH . '/' . ZENFOLDER;
        ?>
/images/icon_inactive.png" alt="" title="<?php 
        gettext('locked');
        ?>
" />
				</div>
				<div class="page-list_icon">
					<img src="<?php 
        echo WEBPATH . '/' . ZENFOLDER;
        ?>
/images/icon_inactive.png" alt="" title="<?php 
        gettext('locked');
        ?>
" />
				</div>
				<div class="page-list_icon">
					<input class="checkbox" type="checkbox" name="disable" value="1" disabled="disabled" />
				</div>
				<?php 
    }
    ?>
		</div><!--  icon wrapper end -->
	</div>
	<?php 
}