コード例 #1
0
ファイル: contents_content.php プロジェクト: span20/Kallay
 //kapcsolodo galeria
 if ($attached_galleries) {
     $query = "\n            SELECT gallery_id, name\n            FROM iShark_Galleries\n        ";
     //ha nincs engedelyezve a videogaleria, akkor kiszedjuk
     if (empty($_SESSION['site_gallery_is_video'])) {
         $query .= " WHERE type != 'v' ";
     }
     $query .= " ORDER BY name";
     $result =& $mdb2->query($query);
     $galleries =& $form->addElement('select', 'galleries', $locale->get('contents_field_galleries'), $result->fetchAll(0, TRUE));
     $galleries->setMultiple(TRUE);
     $galleries->setSize(5);
 }
 // Kapcsolodo letoltesek
 if ($attached_downloads) {
     $downloads =& $form->addElement('select', 'downloads', $locale->get('contents_field_downloads'), getDownloadDirs());
     $downloads->setMultiple(TRUE);
     $downloads->setSize(5);
 }
 //kapcsolodo urlapok
 if ($attached_forms) {
     $query = "\n\t\t\tSELECT form_id, form_title\n\t\t\tFROM iShark_Forms\n\t\t\tWHERE is_active = '1' AND is_deleted = '0'\n\t\t\tORDER BY form_title\n\t\t";
     $result =& $mdb2->query($query);
     $forms =& $form->addElement('select', 'forms', $locale->get('contents_field_forms'), $result->fetchAll(0, TRUE));
     $forms->setMultiple(TRUE);
     $forms->setSize(5);
 }
 //szurok beallitasa
 $form->applyFilter('__ALL__', 'trim');
 /**
  * Szabalyok
コード例 #2
0
ファイル: function.contents.php プロジェクト: span20/Kallay
function getDownloadDirs($parent = 0, $dir = '')
{
    global $mdb2;
    $rows = array();
    $query = "\n\t\t\tSELECT download_id, name \n\t\t\tFROM iShark_Downloads \n\t\t\tWHERE parent={$parent} AND type='D' \n\t\t\tORDER BY name\n\t\t";
    $result =& $mdb2->query($query);
    while ($row = $result->fetchRow()) {
        $rows[$row['download_id']] = $dir . $row['name'] . '/';
        $rows += getDownloadDirs($row['download_id'], $dir . $row['name'] . '/');
    }
    return $rows;
}