예제 #1
0
/**
 * albumselect()
 *
 * return the HTML code for a listbox with name $id that contains the list
 * of all albums
 *
 * @param string $id the name of the listbox
 * @return the HTML code
 */
function albumselect($id = 'album')
{
    global $CONFIG;
    static $select = '';
    if ($select == '') {
        $rowset = get_albumlist(USER_ID);
        $select = '<option value="0">' . SELECT_ALBUM . '</option>\\n';
        foreach ($rowset as $row) {
            $select .= '<option value="' . $row["aid"] . '">' . $row["title"] . '</option>';
        }
    }
    return '<select name="' . $id . '" class="listbox">' . $select . '</select>';
}
예제 #2
0
파일: editpics.php 프로젝트: cbsistem/nexos
        $user_albums = $db->sql_query("SELECT aid, title FROM {$CONFIG['TABLE_ALBUMS']} WHERE category='" . (FIRST_USER_CAT + $user_id) . "' ORDER BY title");
        if ($db->sql_numrows($user_albums)) {
            $user_albums_list = $db->sql_fetchrowset($user_albums);
        } else {
            $user_albums_list = array();
        }
        $db->sql_freeresult($user_albums);
        $USER_ALBUMS_ARRAY[$user_id] = $user_albums_list;
    } else {
        $user_albums_list =& $USER_ALBUMS_ARRAY[$user_id];
    }
}
//define('META_LNK','&amp;cat=0');
pageheader(isset($title) ? $title : '');
if (GALLERY_ADMIN_MODE) {
    $public_albums_list = get_albumlist();
} else {
    $public_albums_list = array();
}
get_user_albums(USER_ID);
if (isset($_POST['pid']) && is_array($_POST['pid'])) {
    process_post_data();
}
!($start = isset($_GET['start']) ? (int) $_GET['start'] : 0);
$count = isset($_GET['count']) ? (int) $_GET['count'] : 25;
$next_target = URL::index('&amp;file=editpics&amp;mode=upload_approval&amp;album=' . $album_id . '&amp;start=' . ($start + $count) . '&amp;count=' . $count);
$prev_target = URL::index('&amp;file=editpics&amp;mode=upload_approval&amp;album=' . $album_id . '&amp;start=' . max(0, $start - $count) . '&amp;count=' . $count);
$s50 = $count == 50 ? 'selected="selected"' : '';
$s75 = $count == 75 ? 'selected="selected"' : '';
$s100 = $count == 100 ? 'selected="selected"' : '';
if (UPLOAD_APPROVAL_MODE) {
예제 #3
0
파일: upload.php 프로젝트: cbsistem/nexos
                case 2:
                    form_alb_list_box($element[0], $element[1]);
                    break;
                case 3:
                    form_textarea($element[0], $element[1], $element[3]);
                    break;
                default:
                    cpg_die(_ERROR, 'Invalid action for form creation', __FILE__, __LINE__);
            }
            // switch
        } else {
            form_label($element);
        }
    }
}
$public_albums_list = get_albumlist(USER_ID);
if (!count($public_albums_list)) {
    $redirect = URL::index("&amp;file=albmgr");
    pageheader(_ERROR, $redirect);
    msg_box(INFO, ERR_NO_ALB_UPLOADABLES, CONTINU, $redirect);
    pagefooter();
    //cpg_die (ERROR, ERR_NO_ALB_UPLOADABLES, __FILE__, __LINE__);
}
pageheader(UP_TITLE);
starttable("100%", UP_TITLE, 2);
echo '
    <script language="JavaScript">
        function textCounter(field, maxlimit) {
            if (field.value.length > maxlimit) // if too long...trim it!
            field.value = field.value.substring(0, maxlimit);
        }