Example #1
0
</HEAD>

<BODY BGCOLOR="silver">
<DIV ALIGN=center>
<?php 
echo AdminMenu();
echo FramedTable1();
$result = db_query("SELECT * FROM {categories} WHERE id = {$page_id}");
if (db_num_rows($result)) {
    $item = db_fetch_array($result);
    $frm['#tags'] = GetTags();
    echo '<form method="post"><table border="0">';
    echo '<tr><td width="50"></td><td><b>' . $item['name'] . '</b>:</td><td>';
    echo FormInput('search', 25) . ' <input type="submit" value="    Search    ">';
    echo '</td><td width="50"></td></tr>';
    echo '<tr><td width="50"></td><td>Tags: ' . FormSelect('cond', array('and' => 'and', 'or' => 'or')) . '</td><td>';
    echo FormCheckarea('tags');
    echo '</td><td width="50"></td></tr>';
    echo '</table></form>';
    $cond = array("C.lnum BETWEEN {$item['lnum']} AND {$item['rnum']}", "P.id = C.id_parent", "C.uniqid = G.uid_cat");
    if (!empty($frm['search'])) {
        $cond[] = "(upper(G.name) LIKE upper('%{$frm['search']}%') OR upper(G.description) LIKE upper('%{$frm['search']}%'))";
    }
    if (isset($frm['tags']) && count($frm['tags'])) {
        if ($frm['cond'] == 'or') {
            $cond[] = "G.id IN (SELECT id_col FROM {tag_collections} T WHERE id_tag IN (" . join(',', $frm['tags']) . "))";
        } else {
            foreach ($frm['tags'] as $tagid) {
                $cond[] = "G.id IN (SELECT id_col FROM {tag_collections} T WHERE id_tag = {$tagid})";
            }
        }
Example #2
0
function DisplayCategoryForm()
{
    global $page_id, $page_pg, $frm;
    // Wartości domyślne
    if (!isset($frm)) {
        $frm = array('catcol' => 1, 'catrow' => 8, 'grcol' => 4, 'grrow' => 4, 'datecr' => date('Y-m-d'));
    }
    if ($page_id) {
        GetCategoryData($page_id);
    }
    $cat_id = $page_id;
    // Jeżeli chcemy dodać nową kategorię to miejsce gdzie jesteśmy wskazuje page_pg
    if (!$cat_id && $page_pg) {
        $cat_id = $page_pg;
    }
    $hier_cat = GetCategoriesHierarchy($frm[parent], $cat_id, 0);
    echo FramedTable1() . '<FORM METHOD="POST">' . '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=1>' . '<TR><TH> Category </TH><TD> ' . FormCheckbox('cathid') . 'Hidden </TD></TR>' . '<TR><TD></TD><TD ALIGN=right> ' . FormSelect('action', array('mod' => 'Modify', 'del' => 'Delete', 'sort' => 'Sort')) . ' <INPUT TYPE=submit VALUE="    Send    "> ' . '</TD></TR>' . '<TR><TD> Parent: </TD><TD> ' . '<SELECT NAME="frm[parent]">' . $hier_cat . '</SELECT>' . FormSelect('inspos', array(1 => 'First', 2 => 'Last', 3 => 'Sort')) . '</TD></TR>' . '<TR><TD> Uniqid & Date: </TD><TD> ' . FormInput('uniqid') . ' ' . FormInput('datecr', 12) . ' </TD></TR>' . '<TR><TD> Name: </TD><TD> ' . FormInput('name') . ' </TD></TR>' . '<TR><TD> Title: </TD><TD> ' . FormInput('title') . ' </TD></TR>' . '<TR><TD> Header: </TD><TD> ' . FormInput('header') . ' </TD></TR>' . '<TR><TD> Description: </TD><TD> ' . FormText('desc', 80, 5) . '<BR>' . FormCheckbox('addbr') . ' Auto add "break line" </TD></TR>' . '<TR><TD COLSPAN=2><HR></TD></TR>' . '<TR><TD> Subcats: </TD><TD> ' . FormSelect('catcol', range(1, 10), 0) . ' x ' . FormSelect('catrow', range(1, 20), 0) . ' (columns x rows) ' . '</TD></TR>' . '<TR><TD> Collections: </TD><TD> ' . FormSelect('grcol', range(1, 10), 0) . ' x ' . FormSelect('grrow', range(1, 20), 0) . ' (columns x rows) ' . '</TD></TR>' . '<TR><TD> Category directory: </TD><TD> ' . FormInput('dircat') . ' </TD></TR>' . '<TR><TD> Template directory: </TD><TD> ' . FormInput('dirtem', 40, PICMAN_DEFAULT_TEMP) . ' </TD></TR>' . '</TABLE>' . '</FORM>' . FramedTable2();
}
Example #3
0
function DisplayCollectionForm()
{
    global $page_id, $frm;
    // Wartości domyślne
    if (!isset($frm)) {
        $frm = array('sercol' => 5, 'serrow' => 4, 'datecr' => date('Y-m-d'));
    }
    if ($page_id) {
        GetCollectionData($page_id);
    }
    $hier_cat = GetCategoriesHierarchy($frm[parent], $page_id, 1);
    // Odczytanie tagów
    $frm['#tags'] = GetTags();
    SetCollectionTags($page_id, 'tags');
    echo FramedTable1() . '<FORM METHOD="POST">' . '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=1>' . '<TR><TH> Collection </TH><TD></TD></TR>' . '<TR><TD></TD><TD ALIGN=right> ' . FormSelect('action', array('mod' => 'Modify', 'del' => 'Delete')) . ' <INPUT TYPE="submit" VALUE="    Send    "> ' . '</TD></TR>' . '<TR><TD> Category: </TD><TD> ' . '<SELECT NAME="frm[parent]">' . $hier_cat . '</SELECT>' . ' Position ' . FormInput('position', 4, 1) . ' </TD></TR>' . '<TR><TD> Uniqid & Date: </TD><TD> ' . FormInput('uniqid') . ' ' . FormInput('datecr', 12) . ' </TD></TR>' . '<TR><TD> Name: </TD><TD> ' . FormInput('name') . ' </TD></TR>' . '<TR><TD> Title: </TD><TD> ' . FormInput('title') . ' </TD></TR>' . '<TR><TD> Header: </TD><TD> ' . FormInput('header') . ' </TD></TR>' . '<TR><TD> Description: </TD><TD> ' . FormText('desc', 80, 5) . '<BR>' . FormCheckbox('addbr') . ' Auto add "break line" </TD></TR>' . '<TR><TD COLSPAN=2><HR></TD></TR>' . '<TR><TD> Tags: </TD><TD> ' . FormCheckarea('tags') . ' </TD></TR>' . '<TR><TD> New tags: </TD><TD> ' . FormText('newtags', 80, 2) . ' </TD></TR>' . '<TR><TD COLSPAN=2><HR></TD></TR>' . '<TR><TD> Series: </TD><TD> ' . FormSelect('sercol', range(1, 10), 0) . ' x ' . FormSelect('serrow', range(1, 10), 0) . ' (columns x rows) ' . '</TD></TR>' . '<TR><TD> Images: </TD><TD> First number ' . FormInput('first', 4, 1) . ' Quantity ' . FormInput('quantity', 4, 1) . ' </TD></TR>' . '<TR><TD> Number holes: </TD><TD> ' . FormText('holes', 60, 2) . ' </TD></TR>' . '<TR><TD COLSPAN=2><HR></TD></TR>' . '<TR><TD> Collection directory: </TD><TD> ' . FormInput('dirgr') . ' </TD></TR>' . '<TR><TD> Image directory: </TD><TD> ' . FormInput('dirimg') . ' </TD></TR>' . '<TR><TD> Thumbnails directory: </TD><TD> ' . FormInput('dirth') . ' </TD></TR>' . '<TR><TD COLSPAN=2><HR></TD></TR>' . '<TR><TD> Pages template: </TD><TD> ' . FormInput('temppage', 50, '%02d') . ' </TD></TR>' . '<TR><TD> Images template: </TD><TD> ' . FormInput('tempimg') . ' </TD></TR>' . '<TR><TD> Thumbnails template: </TD><TD> ' . FormInput('tempth') . ' </TD></TR>' . '<TR><TD COLSPAN=2><HR></TD></TR>' . '<TR><TD> Options: </TD><TD> Links to ' . FormSelect('options', array('' => 'None', 'LP' => 'Page', 'LI' => 'Image')) . ' ' . FormCheckbox('intro') . ' Exist intro page ' . '</TD></TR>' . '<TR><TD> Image on intro page: </TD><TD> ' . FormInput('introimg') . ' </TD></TR>' . '<TR><TD> Thumbnail for group: </TD><TD> ' . FormInput('thumbimg') . ' </TD></TR>' . '</TABLE>' . '</FORM>' . FramedTable2();
    if ($page_id) {
        DisplayThumbForm($page_id);
    }
}