<?php /* ! Setup * * * * * * * */ require_once 'panl.init.php'; $update = 'update.php'; if (file_exists($update)) { $message = new GrlxAlert(); $alert_output = $message->info_dialog('Welcome to 1.0!<br /><br />You should <a href="' . $update . '?go=1">update your database</a> now.'); } /* $link_set[] = array( 'url' => 'book.view.php', 'tap' => 'Browse comic pages', 'title' => '' ); $link_set[] = array( 'url' => 'sttc.page-list.php', 'tap' => 'Browse static pages', 'title' => '' ); $link_set[] = array( 'url' => 'book.page-create.php', 'tap' => 'Create comic page(s)', 'title' => '' ); $link_set[] = array( 'url' => 'sttc.xml-create.php', 'tap' => 'Create static page(s)', 'title' => '' );
} else { $pages_per_view = 70; } if ($start_sort_order > $total_pages) { $start_sort_order = $total_pages - $pages_per_view; } // For reference later $marker_type_list = $db->get('marker_type', null, 'id,title'); $marker_type_list = rekey_array($marker_type_list, 'id'); ///// Alerts and warnings if (!$book->info) { $alert_output .= $message->alert_dialog('This book ID ' . $book_id . ' doesn’t seem to exist.'); } if (!is_dir('../' . DIR_COMICS_IMG)) { @mkdir('../' . DIR_COMICS_IMG); $alert_output .= $message->info_dialog('The ' . DIR_COMICS_IMG . ' folder was missing, so I created it. Just sayin’.'); } elseif (!is_writable('../' . DIR_COMICS_IMG)) { $alert_output .= $message->alert_dialog('I can’t work with the ' . DIR_COMICS_IMG . ' folder. Looks like a permissions problem you need to fix via FTP.'); } /* $link-> title = 'Add a marker'; $link-> url = 'marker.create.php'; $link-> tap = 'Do something about that'; if ( !$book-> markerList && $book-> pageList ) { $alert_output .= $message->info_dialog('Hmm, no chapters here. '.$link-> paint().'.'); } elseif ( !$book-> markerList && !$book-> pageList ) { $alert_output .= $message->info_dialog('Hmm, no chapters here. No pages either. <a href="marker.create.php">Do something about that</a>.'); } */
} } if ($adlist_content) { $heading_list = array(); // reset $heading_list[] = array('value' => 'Ad ID', 'class' => null); $heading_list[] = array('value' => 'Actions', 'class' => null); $list->headings($heading_list); $list->row_class('ad'); $final_adlist_content = array(); $final_adlist_content = array_merge($final_adlist_content, $adlist_content); $list->content($final_adlist_content); $adsense_list_output .= $list->format_headings(); $adsense_list_output .= $list->format_content(); } else { $adsense_list_output = $message->info_dialog('No Google Adsense ads found.'); } $adsense_new_link = new GrlxLink(); $adsense_new_link->url = 'ad.adsense-edit.php'; $adsense_new_link->class = 'main-button right'; $adsense_new_link->tap = '<i class="plus"></i>Create an AdSense ad'; $adsense_new_link->title = 'Enter new AdSense code'; $adsense_list_output .= $adsense_new_link->paint(); ///////// Build the promos panel. if ($ad_list) { $heading_list = array(); // reset /* $heading_list[] = array( 'value' => 'Mobile image', 'class' => null
/***** * Display */ $output = $view->open_view(); $output .= $view->view_header(); $output .= $modal->modal_container(); $output .= $alert_output; print $output; ?> <section class="sttc"> <?php if ($page_list_output) { print $page_list_output; } else { $message = new GrlxAlert(); print $message->info_dialog('Your site has no static pages. No FAQ, no About the Artist, nothing.'); } ?> </section> <?php $js_call = <<<EOL \t\$( "a.delete i" ).hover( // highlight item to be deleted \t\tfunction() { \t\t\t\$( this ).parent().parent().addClass("red-alert"); \t\t}, function() { \t\t\t\$( this ).parent().parent().removeClass("red-alert"); \t\t} \t); \t\$( "i.edit" ).hover( // highlight the editable item \t\tfunction() { \t\t\t\$( this ).parent().parent().addClass("editme");
*/ // Reset in case of form submission. $folder_list = array(); $file_list = array(); // What’s in the import folder? $import_top_list = $fileops->get_dir_list($import_path); if ($import_top_list) { foreach ($import_top_list as $key => $val) { if (is_dir($import_path . '/' . $val)) { $folder_list[$val] = $import_path . '/' . $val; } else { $file_list[$val] = $import_path . '/' . $val; } } } elseif (!$_POST) { $alert_output .= $message->info_dialog('No folders found in /import on your web server. <a href="http://www.getgrawlix.com/docs/1/importing#ftp-importer">Learn more.</a>'); } if ($folder_list) { $permissions_error_found = false; $total_count = 0; foreach ($folder_list as $key => $val) { $count = $fileops->get_dir_list($val); $count = count($count); $total_count += $count; $permissions = fileperms($val); if ($permissions && $permissions != '16895') { $permissions_error = '<strong>Access error</strong>'; $permissions_error_found = true; } else { $permissions_error = 'Looks good'; }