foreach (array('snippet_title', 'video_title', 'video_desc', 'video_time', 'video_date') as $option) {
        if (isset($_POST[$option])) {
            $args[$option] = $_POST[$option];
        }
    }
    $status = update_option('bsf_video', $args);
    displayStatus($status);
}
if (isset($_POST['article_submit'])) {
    foreach (array('snippet_title', 'article_name', 'article_author', 'article_desc', 'article_image') as $option) {
        if (isset($_POST[$option])) {
            $args[$option] = $_POST[$option];
        }
    }
    $status = update_option('bsf_article', $args);
    displayStatus($status);
}
function displayStatus($status)
{
    if ($status) {
        echo '<div class="updated"><p>' . __('Success! Your changes were successfully saved!', 'rich-snippets') . '</p></div>';
    } else {
        echo '<div class="error"><p>' . __('Sorry, Your changes are not saved!', 'rich-snippets') . '</p></div>';
    }
}
if (isset($_GET['action'])) {
    if ($_GET['action'] == 'reset') {
        $option_to_reset = $_GET['options'];
        if ($option_to_reset == 'review') {
            delete_option('bsf_review');
        }
Exemplo n.º 2
0
<head>
	<title><?php 
print $header . ' | ' . $this->preference->item('site_name');
?>
</title>
	<?php 
print $this->page->output_variables();
?>
	<?php 
print $this->page->output_assets('admin');
?>
</head>
<body style="padding: 2em;">
    <a name="top"></a>
    <?php 
print displayStatus();
?>
    <?php 
print isset($content) ? $content : NULL;
?>
    <?php 
if (isset($page)) {
    if (isset($module)) {
        $this->load->module_view($module, $page);
    } else {
        $this->load->view($page);
    }
}
?>
</body>
</html>
Exemplo n.º 3
0
<div id="navigation">
    <?php print $this->load->view($this->config->item('backendpro_template_admin') . 'menu');?>
</div>
<div id="breadcrumb">
        <?php print $this->bep_site->get_breadcrumb();?>
    </div>
<div id="content">
    <a name="top"></a>
    <?php print displayStatus();?>
    <?php print (isset($content)) ? $content : NULL; ?>
    <?php
    if( isset($page)){
    if( isset($module)){
            $this->load->view($module."/".$page);
        } else {
            $this->load->view($page);
        }}
    ?>
    <br style="clear: both" />
</div>
Exemplo n.º 4
0
    // send users logged in status
    $header .= clean($user->data['is_registered'] ? 1 : 0) . $delims[1];
    // send new private message count
    $header .= clean($user->data['user_new_privmsg']);
    // insert this into the output
    $output = $header . $delims[2] . $output;
    // send the output to TouchBB
    echo $appName;
    if ($get == 'status') {
        echo count($delims) . implode($delims, '');
    }
    echo $output . $delims[1] . md5($output);
    // clean up properly
    garbage_collection();
} else {
    displayStatus();
}
// ***************************
// ******** FUNCTIONS ********
// ***************************
function clean($str, $uid = '')
{
    global $fm, $config, $user, $phpbb_root_path, $delims;
    $str = stripslashes($str);
    $str = replace_all("\r\n", "\n", $str);
    if ($uid) {
        $str = str_replace("\n", '<br>', $str);
        // convert bbcode smilies to img sources, checking image width to see if it will fit on the phone or not
        if (preg_match_all('/<!-- s(.*?) --><img src="{SMILIES_PATH}\\/(.*?)" alt="(.*?)" title="(.*?)" \\/><!-- s(.*?) -->/is', $str, $matches)) {
            $tags = $matches[0];
            $icons = $matches[2];
Exemplo n.º 5
0
function bookPage()
{
    $books = new Books();
    $id = (int) $_GET['book'] + 0;
    if (!isset($books[$id])) {
        notFound();
    }
    $book = $books[$id];
    global $tpl;
    $tpl->assign('page_title', $book['title']);
    $tpl->assign('menu_links', Path::menu('book'));
    $tpl->assign('menu_links_admin', Path::menuAdmin('book'));
    $tpl->assign('book', $book);
    $tpl->assign('id', $book['id']);
    $tpl->assign('displayStatus', displayStatus($book['status']));
    $tpl->assign('displayAuthors', displayAuthors($book['author']));
    $tpl->assign('displayNote', displayNote($book['note']));
    $tpl->assign('country', $book['country']);
    $tpl->assign('displayGenres', displayGenres($book['genre']));
    $tpl->assign('token', getToken());
    $tpl->assign('books_count', $books->count());
    $tpl->assign('book_next', $books->nextBook($book['id']));
    $tpl->assign('book_previous', $books->previousBook($book['id']));
    $social_url = str_replace('./', BASE_URL, Path::book($book['id']));
    $tpl->assign('social', ['title' => $book['title'], 'description' => ($book['status'] == Book::SEEN ? displaySimpleNote($book['note']) . ' — ' : '') . str_replace('<br />', '', displaySummary($book['summary'], 250)), 'image' => Books::CompleteImageURI($book), 'twitter' => urlencode(($book['status'] == Book::SEEN ? 'I’ve rated ' . $book['note'] . ' ' . String::pluralize('star', $book['note']) : 'I want to read') . ' “' . $book['title'] . '” from ' . $book['author'] . ' ' . $social_url), 'url' => $social_url]);
    $tpl->draw('book');
    exit;
}
Exemplo n.º 6
0
            } elseif ($key == "xmlurl" . $i && $value != '' && $_POST["addbox" . $i] != 'checkbox') {
                $i++;
            }
        }
        if ($list->save()) {
            if (ZF_DEBUG) {
                print_r($list->channels);
            }
            displayStatus("list saved");
            //TODO : goto list button
            displayGotoButton($list->name);
        } else {
            displayStatus($list->lastError);
        }
    } else {
        displayStatus("Error parsing the subscriptions list : " . $list->name . "<br/>Feeds were NOT added.");
    }
    echo '</div>';
} else {
    ?>

<div id="core">
<div class="frame">
<form method="post" name="subopml" action="<?php 
    echo $_SERVER['PHP_SELF'] . '?zfaction=importlist';
    ?>
">
		<strong>Import OPML subscriptions</strong><br/><br/><br/>
      Local path or remote URL of an OPML subscription list<br/>
      <input name="opmlurl" type="text" size="50"/>
      <input name="fetchopml" type="submit" id="fetchopml" value=" go "/>
Exemplo n.º 7
0
    exit;
}
if (!is_writable(ZF_CONFIGFILE)) {
    displayStatus('config.php is not writable (you cannot save changes)!');
}
if (isset($_POST['dosave']) && $_POST['dosave'] == 'Save') {
    if ($_POST['newpassword'] == $_POST['confirmpassword'] && $_POST['newpassword'] != '') {
        $_POST['adminpassword'] = crypt($_POST['newpassword']);
    } else {
        $_POST['adminpassword'] = ZF_ADMINPASS;
    }
    $_POST['zfurl'] = ZF_URL;
    if (saveConfig($_POST)) {
        displayStatus('Configuration saved.');
    } else {
        displayStatus('Configuration NOT saved.');
    }
} else {
    ?>

<div id="core">
	<form name="configform" action="<?php 
    echo $_SERVER['PHP_SELF'] . '?zfaction=config';
    ?>
" method="post">
		<div class="frame">
		<h2>General configuration</h2>

			<div class="twocols">
				<div class="col1">
					<label for="adminname">Admin username: </label>
Exemplo n.º 8
0
                        $stmt->execute(array(':id' => $TimeLog['id'], ':pid' => $TimeLog['pid'], ':description' => $TimeLog['description'], ':start' => $TimeLog['start'], ':end' => $TimeLog['end'], ':dur' => $TimeLog['dur'], ':client' => $TimeLog['client'], ':project' => $TimeLog['project']));
                        displayStatus("Added time record " . $TimeLog['id']);
                    } catch (PDOException $e) {
                        displayStatus("Couldn't insert time record " . $TimeLog['id']);
                        die($e);
                    }
                }
            } catch (PDOException $e) {
                displayStatus("Couldn't check for existing time record (" + $TimeLog['id'] + ")");
                die($e);
            }
        }
    } catch (PDOException $e) {
        displayStatus("Error looking for project " . $Project['id'] . " in database.");
        die($e);
    }
}
/**
 * $endTime
 * Mark when the program finished so we can show the time elapsed
 */
$endTime = microtime(true);
/**
 * $elapsedTime
 * Total time spent executing the program
 */
$elapsedTime = $endTime - $startTime;
//Show the elapsed time.
displayStatus("Program finished in " . $elapsedTime . " seconds.");
displayStatus("===========================================");
Exemplo n.º 9
0
// Allow testing admins to display the hidden puzzle info
if ($hidePuzzleInfo) {
    echo '<a href="#" id="showTestLink">Show Answer, Summary, and Description</a>';
    echo '<a href="#" id="hideTestLink" class="hideFromTest">Hide Answer, Summary, and Description</a>';
}
// Allow author and lurkers to edit summary and description
echo '<p class="small"><a href="' . URL . "/puzzle.php?edit&pid={$pid}" . '">';
echo 'Edit Title, Summary and Description</a></p>';
echo "</div>";
// List various people working on the puzzle
echo "<div class='peopleInfo'>";
displayPeople($uid, $pid);
echo "</div>";
// List puzzle status
echo "<div class='statusInfo'>";
displayStatus($uid, $pid);
echo "</div>";
// List puzzle notes
echo "<div class='notesInfo'>";
displayNotes($uid, $pid);
echo "</div>";
// List puzzle editor notes
echo "<div class='notesInfo'>";
displayEditorNotes($uid, $pid);
echo "</div>";
// List puzzle runtime info
echo "<div class='notesInfo'>";
displayRuntime($uid, $pid);
echo "</div>";
// List credits
if (USING_CREDITS) {
Exemplo n.º 10
0
        @($datas = fread($fp, 4096));
        if (strlen($datas) == 0) {
            break;
        }
        $sitehtmldata .= $datas;
    }
    @fclose($fp);
    if ($sitehtmldata != '') {
        $rssloc = getRSSlocation($sitehtmldata, $siteurl);
        if ($rssloc != false) {
            echo parse_feed($rssloc, $htmldata);
        } else {
            displayStatus("Autodiscovery didn't detected any feeds. If the site has them add them manually from the Feed URL form.");
        }
    } else {
        displayStatus("Error: could not read the specified URL");
    }
    echo '</div>';
} elseif (isset($feedurl) && $feedurl != '') {
    echo '<div id="core">';
    /* Case 3: parse feed(s) given in the form or via bookmarklet
                 display a form for each feed
       */
    //if got from the bookmarklet, all urls are separated by a pipe character
    $tempfeedurl = explode("|", $feedurl);
    foreach ($tempfeedurl as $xmlurl) {
        echo parse_feed($xmlurl, $htmldata);
    }
    echo '</div>';
} else {
    // Default: basic form to enter feed or site address