예제 #1
0
<script type="text/javascript" src="http://js.nicedit.com/nicEdit-latest.js"></script>
<script src="js/jquery.js"></script>
<script src="../js/bootstrap-datepicker.js"></script>

<script type="text/javascript">
    $(window).load(function(){
        $('#automodal').modal('show');
    });
</script>

								</head>
<body>
<?php 
echo upload_picture();
echo update_ket();
echo edit_gallery();
?>
<div id="wrapper">

					
        <!-- Navigation -->
        <nav class="navbar navbar-default navbar-fixed-top" role="navigation">
            <!-- Brand and toggle get grouped for better mobile display -->
            <div class="navbar-header">
                <a class="navbar-brand" href="index.php" id="nav-pandan">KATAR 06</a>
            </div>
            <!-- Top Menu Items -->
            <ul class="nav navbar-right top-nav">
                <li class="dropdown">
                    <a href="" class="dropdown-toggle" data-toggle="dropdown"><?php 
echo chat_pesan_counter();
예제 #2
0
/**
 * Edit a download.
 *
 * @param  AUTO_LINK			The ID of the download to edit
 * @param  AUTO_LINK			The ID of the category the download is to be in
 * @param  SHORT_TEXT		The name of the download
 * @param  URLPATH			The URL to the download
 * @param  LONG_TEXT			The description of the download
 * @param  ID_TEXT			The author of the download (not necessarily same as the submitter)
 * @param  LONG_TEXT			The comments for the download
 * @param  AUTO_LINK			The out-mode-id (the ID of a download that this download is an old version of). Often people wonder why this is specified with the old version, and not the opposite with the new version - it is because statistically, we perceive more chance of downloads merging than splitting
 * @param  integer			The ordered number of the gallery image to use as the download representative image
 * @param  BINARY				Whether the download has been validated
 * @param  BINARY				Whether the download may be rated
 * @param  SHORT_INTEGER	Whether comments are allowed (0=no, 1=yes, 2=review style)
 * @param  BINARY				Whether the download may be trackbacked
 * @param  LONG_TEXT			Hidden notes pertaining to the download
 * @param  SHORT_TEXT		The downloads original filename (the URL may be obfuscated)
 * @param  integer			The file size of the download (we can't really detect this in real-time for remote URLs)
 * @param  integer			The cost of the download that members will have to pay to get it
 * @param  BINARY				Whether the submitter gets the points for the download (they are selling it) (otherwise they are just thrown out, which is an alternative model - one of enforcing community point building)
 * @param  ?AUTO_LINK		The licence to use (NULL: none)
 * @param  SHORT_TEXT		Meta keywords
 * @param  LONG_TEXT			Meta description
 */
function edit_download($id, $category_id, $name, $url, $description, $author, $comments, $out_mode_id, $default_pic, $validated, $allow_rating, $allow_comments, $allow_trackbacks, $notes, $original_filename, $file_size, $cost, $submitter_gets_points, $licence, $meta_keywords, $meta_description)
{
    require_code('urls2');
    suggest_new_idmoniker_for('downloads', 'view', strval($id), $name);
    if ($file_size == 0 || url_is_local($url)) {
        if (url_is_local($url)) {
            $file_size = filesize(get_custom_file_base() . '/' . rawurldecode($url));
        } else {
            $file_size = @filesize($url) or $file_size = NULL;
        }
    }
    $myrows = $GLOBALS['SITE_DB']->query_select('download_downloads', array('name', 'description', 'comments'), array('id' => $id), '', 1);
    if (!array_key_exists(0, $myrows)) {
        warn_exit(do_lang_tempcode('MISSING_RESOURCE'));
    }
    $myrow = $myrows[0];
    require_code('seo2');
    seo_meta_set_for_explicit('downloads_download', strval($id), $meta_keywords, $meta_description);
    require_code('files2');
    delete_upload('uploads/downloads', 'download_downloads', 'url', 'id', $id, $url);
    $met = @ini_get('max_execution_time');
    $data_mash = create_data_mash($url, NULL, get_file_extension($original_filename));
    if (function_exists('set_time_limit')) {
        @set_time_limit($met);
    }
    if (!addon_installed('unvalidated')) {
        $validated = 1;
    }
    require_code('submit');
    $just_validated = !content_validated('download', strval($id)) && $validated == 1;
    if ($just_validated) {
        send_content_validated_notification('download', strval($id));
    }
    $map = array('download_data_mash' => $data_mash, 'download_licence' => $licence, 'original_filename' => $original_filename, 'download_submitter_gets_points' => $submitter_gets_points, 'download_cost' => $cost, 'edit_date' => time(), 'file_size' => $file_size, 'allow_rating' => $allow_rating, 'allow_comments' => $allow_comments, 'allow_trackbacks' => $allow_trackbacks, 'notes' => $notes, 'name' => lang_remap($myrow['name'], $name), 'description' => lang_remap_comcode($myrow['description'], $description), 'comments' => lang_remap_comcode($myrow['comments'], $comments), 'validated' => $validated, 'category_id' => $category_id, 'url' => $url, 'author' => $author, 'default_pic' => $default_pic, 'out_mode_id' => $out_mode_id);
    $GLOBALS['SITE_DB']->query_update('download_downloads', $map, array('id' => $id), '', 1);
    $self_url = build_url(array('page' => 'downloads', 'type' => 'entry', 'id' => $id), get_module_zone('downloads'), NULL, false, false, true);
    if ($just_validated) {
        require_lang('downloads');
        require_code('notifications');
        $subject = do_lang('DOWNLOAD_NOTIFICATION_MAIL_SUBJECT', get_site_name(), $name);
        $mail = do_lang('DOWNLOAD_NOTIFICATION_MAIL', comcode_escape(get_site_name()), comcode_escape($name), array(comcode_escape($self_url->evaluate())));
        dispatch_notification('download', strval($category_id), $subject, $mail);
    }
    log_it('EDIT_DOWNLOAD', strval($id), get_translated_text($myrow['name']));
    if (addon_installed('galleries')) {
        // Change its gallery
        require_code('galleries2');
        $download_gallery_root = get_option('download_gallery_root');
        if (is_null($download_gallery_root)) {
            $download_gallery_root = 'root';
        }
        $test = $GLOBALS['SITE_DB']->query_value_null_ok('galleries', 'parent_id', array('name' => 'download_' . strval($id)));
        if (!is_null($test)) {
            edit_gallery('download_' . strval($id), 'download_' . strval($id), do_lang('GALLERY_FOR_DOWNLOAD', $name), '', '', '', $download_gallery_root);
        }
    }
    decache('main_recent_downloads');
    decache('main_top_downloads');
    decache('main_download_category');
    decache('main_download_tease');
    require_code('feedback');
    update_spacer_post($allow_comments != 0, 'downloads', strval($id), $self_url, $name, get_value('comment_forum__downloads'));
}
예제 #3
0
 /**
  * Standard aed_module edit actualiser.
  *
  * @param  ID_TEXT		The entry being edited
  */
 function edit_actualisation($id)
 {
     $name = post_param('name', fractional_edit() ? $id : 'root');
     $parent_id = post_param('parent_id', STRING_MAGIC_NULL);
     $accept_images = post_param_integer('accept_images', fractional_edit() ? INTEGER_MAGIC_NULL : 0);
     $accept_videos = post_param_integer('accept_videos', fractional_edit() ? INTEGER_MAGIC_NULL : 0);
     $is_member_synched = post_param_integer('is_member_synched', fractional_edit() ? INTEGER_MAGIC_NULL : 0);
     $flow_mode_interface = post_param_integer('flow_mode_interface', fractional_edit() ? INTEGER_MAGIC_NULL : 0);
     if (!fractional_edit()) {
         $urls = get_url('image_url', 'rep_image', 'uploads/grepimages', 0, OCP_UPLOAD_IMAGE);
         $url = $urls[0];
         if ($url == '' && post_param_integer('rep_image_unlink', 0) != 1) {
             $url = NULL;
         }
         $watermark_top_left = get_url('', 'watermark_top_left', 'uploads/watermarks', 0, OCP_UPLOAD_IMAGE);
         if ($watermark_top_left[0] == '' && post_param_integer('watermark_top_left_unlink', 0) != 1) {
             $watermark_top_left[0] = NULL;
         }
         $watermark_top_right = get_url('', 'watermark_top_right', 'uploads/watermarks', 0, OCP_UPLOAD_IMAGE);
         if ($watermark_top_right[0] == '' && post_param_integer('watermark_top_right_unlink', 0) != 1) {
             $watermark_top_right[0] = NULL;
         }
         $watermark_bottom_left = get_url('', 'watermark_bottom_left', 'uploads/watermarks', 0, OCP_UPLOAD_IMAGE);
         if ($watermark_bottom_left[0] == '' && post_param_integer('watermark_bottom_left_unlink', 0) != 1) {
             $watermark_bottom_left[0] = NULL;
         }
         $watermark_bottom_right = get_url('', 'watermark_bottom_right', 'uploads/watermarks', 0, OCP_UPLOAD_IMAGE);
         if ($watermark_bottom_right[0] == '' && post_param_integer('watermark_bottom_right_unlink', 0) != 1) {
             $watermark_bottom_right[0] = NULL;
         }
     } else {
         $url = STRING_MAGIC_NULL;
         $watermark_top_left = STRING_MAGIC_NULL;
         $watermark_top_right = STRING_MAGIC_NULL;
         $watermark_bottom_left = STRING_MAGIC_NULL;
         $watermark_bottom_right = STRING_MAGIC_NULL;
     }
     $allow_rating = post_param_integer('allow_rating', fractional_edit() ? INTEGER_MAGIC_NULL : 0);
     $allow_comments = post_param_integer('allow_comments', fractional_edit() ? INTEGER_MAGIC_NULL : 0);
     $g_owner_name = post_param('g_owner', NULL);
     if (is_null($g_owner_name)) {
         $g_owner = $GLOBALS['SITE_DB']->query_value('galleries', 'g_owner', array('name' => $name));
     } else {
         $g_owner = $GLOBALS['FORUM_DRIVER']->get_member_from_username($g_owner_name);
     }
     if (fractional_edit()) {
         $g_owner = INTEGER_MAGIC_NULL;
     }
     edit_gallery($id, $name, post_param('fullname'), post_param('description', STRING_MAGIC_NULL), post_param('teaser', STRING_MAGIC_NULL), post_param('notes', STRING_MAGIC_NULL), $parent_id, $accept_images, $accept_videos, $is_member_synched, $flow_mode_interface, $url, $watermark_top_left[0], $watermark_top_right[0], $watermark_bottom_left[0], $watermark_bottom_right[0], post_param('meta_keywords', STRING_MAGIC_NULL), post_param('meta_description', STRING_MAGIC_NULL), $allow_rating, $allow_comments, $g_owner);
     $this->new_id = $name;
     if (!fractional_edit()) {
         $this->set_permissions($name);
     }
 }