Beispiel #1
0
    echo $error->get_warning('category_warning');
    ?>
						</td>
					</tr>
					<?php 
    if ($settings['reciprocal_links_option'] == 'Y') {
        ?>
					<tr>
						<td>
							<?php 
        echo RECIPROCAL_URL_LABEL;
        ?>
						</td>
						<td>
							<input type="text" value="<?php 
        echo isset($_POST['reciprocal_post']) ? openld_htmlspecialchars($_POST['reciprocal_post']) : "";
        ?>
" name="reciprocal_url" />
							<br />
							<?php 
        echo $error->get_warning('reciprocal_warning');
        ?>
						</td>
					</tr>
					<?php 
    }
    ?>
					<?php 
    ($hook = get_hook('submit_table_fields')) ? eval($hook) : null;
    ?>
				</table>
    ?>
</textarea>
				<?php 
    echo $error->get_warning('description_warning');
    ?>
			</td>
		</tr>
		<tr>
			<td>
				<?php 
    echo DOMAIN_LABEL;
    ?>
			</td>
			<td>
				<input type="text" name="domain_name_or_path" value="<?php 
    echo openld_htmlspecialchars($settings['domain']);
    ?>
" size="50" maxlength="255" />
				<?php 
    echo $error->get_warning('url_warning');
    ?>
			</td>
		</tr>
		<tr>
			<td>
				<?php 
    echo LANGUAGE_LABEL;
    ?>
			</td>
			<td>
				<select name="language">
			<fieldset id="admin-welcome">
				<legend>
					<span>
						<?php 
    echo EDIT_LABEL;
    ?>
: <?php 
    echo $_GET['template'];
    echo $f_names[$_REQUEST['edit_file']]['filename'];
    ?>
					</span>
				</legend>
				<br />
				<textarea name="filetext" rows="25" cols="75" id="start_input"><?php 
    $t_file = fopen(OPENLD_ROOT . 'themes/' . $_GET['template'] . '/' . $f_names[$_REQUEST['edit_file']]['filename'], 'r');
    echo openld_htmlspecialchars(fread($t_file, filesize(OPENLD_ROOT . 'themes/' . $_GET['template'] . '/' . $f_names[$_REQUEST['edit_file']]['filename'])));
    fclose($t_file);
    ?>
</textarea>
				<input type="hidden" name="id" value="<?php 
    echo $_REQUEST['edit_file'];
    ?>
" />
				<br /><br />
			</fieldset><br />
			<input type="submit" name="edited_link" value="<?php 
    echo SAVE_BUTTON;
    ?>
" />
		</div>
	</form>
							<em>
								<?php 
//echo $error->get_warning('ip_warning');
?>
							</em>
						</span>
					</p>
					<!-- Link parent selector like move_array_select() may be added later -->
					<p class="buttoned">
						<label class="adlabel">
							Link id
						</label>
						<br />
							<span class="adinput">
							<input type="text" name="edit_comment_link_id" value="<?php 
echo openld_htmlspecialchars($result[4]);
?>
" size="35" maxlength="20" id="start_input"/>
							<br />
							<em>
								<?php 
//echo $error->get_warning('link_id_warning');
?>
							</em>
							<br />
						</span>
						<br />
					</p>
				</div>
				<span class="adsubmit">
					<input type="hidden" name="extension" value="link_comments" />
: <?php 
    echo openld_htmlspecialchars($comments['name']);
    ?>
<br />
							<?php 
    echo SUBMITTED_LABEL;
    ?>
 <?php 
    echo $comments['date'];
    ?>
<br />
							<?php 
    echo GB_COMMENT_LABEL;
    ?>
: </b><?php 
    echo openld_htmlspecialchars($comments['comment']);
    ?>
<br />
							<a href="admin_plugins.php?extension=guestbook&amp;edit_comment=<?php 
    echo $comments['id'];
    ?>
"><?php 
    echo EDIT_LABEL;
    ?>
</a>
							<a href="admin_plugins.php?extension=guestbook&amp;delete_comment=<?php 
    echo $comments['id'];
    ?>
&amp;reported_comments=<?php 
    echo $req_page;
    ?>
"><?php 
            echo MOVE_LABEL;
            ?>
</a>
				<a href="admin_accept_categories.php?edit_cat=<?php 
            echo openld_htmlspecialchars($links['id']);
            ?>
&amp;page=<?php 
            echo $req_page;
            ?>
"><?php 
            echo EDIT_LABEL;
            ?>
</a>
				<a href="admin_accept_categories.php?delete=<?php 
            echo openld_htmlspecialchars($links['id']);
            ?>
&amp;page=<?php 
            echo $req_page;
            ?>
"><?php 
            echo DELETE_LABEL;
            ?>
</a>
				<?php 
            ($hook = get_hook('admin_accept_categories_suggested_cell_footer')) ? eval($hook) : null;
            ?>
			</td>
		</tr>
		<?php 
        }
<?php

echo '<b>' . TS_HITS_LABEL . ':</b>' . openld_htmlspecialchars($links['hits']);
Beispiel #8
0
		<?php 
    echo $pagination;
    ?>
	</div>
</div>
<?php 
} elseif (isset($_GET['term']) && $db->num_rows($search_results) == 0) {
    ?>
<div class="openld-block openld-form">
	<h2>
		<span>
			<?php 
    echo SERCHED_FOR_LABEL;
    ?>
 "<?php 
    echo openld_htmlspecialchars($_GET['term']);
    ?>
"
		</span>
	</h2>
	<div class="openld-content">
		<?php 
    ($hook = get_hook('search_no_results_header')) ? eval($hook) : null;
    ?>
		<?php 
    echo NO_MATCHES;
    ?>
		<?php 
    ($hook = get_hook('search_no_results_footer')) ? eval($hook) : null;
    ?>
	</div>
								<?php 
        echo $error->get_warning('author_warning');
        ?>
							</em>
						</span>
					</p>
	<p>
						<label class="adlabel">
							<?php 
        echo DESCRIPTION_LABEL;
        ?>
						</label>
						<br />
						<span class="adinput">
							<textarea name="description" rows="10" cols="75"><?php 
        echo openld_htmlspecialchars($ext_data['extension']['description']);
        ?>
</textarea>
							<br />
							<em>
								<?php 
        echo $error->get_warning('description_warning');
        ?>
							</em>
						</span>
					</p>
					<p>
						<label class="adlabel">
							<?php 
        echo HOOKS;
        ?>
Beispiel #10
0
    echo LL_CREATED_LABEL;
    ?>
</th>
				</tr>
			</thead>
			<tbody class="hasicon">
				<?php 
    while ($link = $db->fetch_assoc($latest_links_sql)) {
        ?>
				<tr>
					<td class="tcl">
						<a href="<?php 
        echo $link['url'];
        ?>
"><?php 
        echo openld_htmlspecialchars($link['title']);
        ?>
</a>
					</td>
					<td class="tcl">
						<?php 
        echo $link['date_submitted'];
        ?>
					</td>
				</tr>
				<?php 
    }
    ?>
			</tbody>
		</table>
		<?php 
Beispiel #11
0
        $page_number = isset($_REQUEST['page']) ? intval($_REQUEST['page']) : '1';
        $num_rows = $db->num_rows($results);
        $num_pages = ceil($num_rows / $settings['number_of_search_results_per_page']);
        $pages_string = paginate($num_pages, $page_number, 'admin_plugins.php?plugin=' . $plugin_name . '&amp;term=' . $_REQUEST['term'] . '&amp;search_in=' . $_REQUEST['search_in'] . '&amp;sort_by=' . $_REQUEST['sort_by'] . '&amp;search_type=' . $_REQUEST['search_type'] . '&amp;page=#p');
        while ($row = $db->fetch_assoc($sql_string_limit)) {
            if ($_REQUEST['search_type'] == 'categories') {
                $row['url'] = 'admin_browse.php?id=' . $row['id'];
                $admin_controls = '<a href="admin_browse.php?move_cat=' . $row['id'] . '&amp;id=' . $row['father_id'] . '&amp;page=0">Move</a> 
				<a href="admin_browse.php?edit_cat=' . $row['id'] . '&amp;id=' . $row['father_id'] . '&amp;page=0">Edit</a> 
				<a href="admin_browse.php?delete=' . $row['id'] . '&amp;id=' . $row['father_id'] . '&amp;page=0">Delete</a>';
            } else {
                $admin_controls = '<a href="admin_browse.php?move_link=' . $row['id'] . '&amp;id=' . $row['category_id'] . '&amp;page=0">Move</a> 
				<a href="admin_browse.php?edit_link=' . $row['id'] . '&amp;id=' . $row['category_id'] . '&amp;page=0">Edit</a> 
				<a href="admin_browse.php?delete_link=' . $row['id'] . '&amp;id=' . $row['category_id'] . '&amp;page=0">Delete</a>';
            }
            $row_results .= '<tr class="altstyle"><td class="tcl"><a href="' . $row['url'] . '">' . openld_htmlspecialchars($row['title']) . '</a><br />' . openld_htmlspecialchars($row['description']) . '<br />' . $admin_controls . '</td></tr>';
        }
        $row_results .= '</tbody></table>' . $pages_string;
    } else {
        $row_results = "No Matches";
    }
    $search_results = '<div class="openld-adblock openld-adform"><h2><span>Searched for "' . $old_term . '"</span></h2><div class="openld-adcontent">' . $row_results . '</div></div>';
}
?>
<div id="openldbb-admain1" class="openld-adblock openld-adform">
	<h2><span>Search</span></h2>
	<div class="openld-adcontent">
		<form method="POST">
			<div class="adformpanel">
				<fieldset>
					<legend><span>Search for Links or Categories</span></legend>
Beispiel #12
0
function error()
{
    global $settings;
    //see punbb's rewrite.php for use of FORUM_HTTP_RESPONSE_CODE_SET(OPENLD_HTTP_RESPONSE_CODE_SET)!
    if (!headers_sent()) {
        // if no HTTP responce code is set we send 503
        if (!defined('OPENLD_HTTP_RESPONSE_CODE_SET')) {
            header('HTTP/1.1 503 Service Temporarily Unavailable');
        }
        header('Content-type: text/html; charset=utf-8');
    }
    /*
    	Parse input parameters. Possible function signatures:
    	error('Error message.');
    	error(__FILE__, __LINE__);
    	error('Error message.', __FILE__, __LINE__);
    */
    $num_args = func_num_args();
    if ($num_args == 3) {
        $message = func_get_arg(0);
        $file = func_get_arg(1);
        $line = func_get_arg(2);
    } else {
        if ($num_args == 2) {
            $file = func_get_arg(0);
            $line = func_get_arg(1);
        } else {
            if ($num_args == 1) {
                $message = func_get_arg(0);
            }
        }
    }
    // Set a default title if the there's no title in settings (installation etc)
    if (empty($settings)) {
        $settings['title'] = 'OpenLD';
        $settings['gzip'] = 'N';
    }
    if (!defined('OPENLD_DISABLE_BUFFERING')) {
        if (extension_loaded('zlib')) {
            // zlib.output_compression can be returned in an integer OR boolean
            if (is_integer(ini_get("zlib.output_compression")) && ini_get("zlib.output_compression") == 0 || is_bool(ini_get("zlib.output_compression")) && !ini_get("zlib.output_compression")) {
                // For some very odd reason, "Norton Internet Security" unsets this
                $_SERVER['HTTP_ACCEPT_ENCODING'] = isset($_SERVER['HTTP_ACCEPT_ENCODING']) ? $_SERVER['HTTP_ACCEPT_ENCODING'] : '';
                // Should we use gzip output compression?
                if ($settings['gzip'] == 'Y' && function_exists('ob_gzhandler') && (strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') !== false || strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'deflate') !== false)) {
                    // Empty output buffer and stop buffering
                    @ob_end_clean();
                    // "Restart" output buffering if we are using ob_gzhandler (since the gzip header is already sent)
                    ob_start('ob_gzhandler');
                } else {
                    // Empty output buffer and stop buffering
                    @ob_end_clean();
                    // "Restart" output buffering
                    ob_start();
                }
            }
            // Else
            // Nothing is supposed to happen here since zlib.output_compression is on and takes care of the compression
            // @ob_end_clean(); and ob_start(); is therefore not supposed to be here
        } else {
            // Empty output buffer and stop buffering
            @ob_end_clean();
            // "Restart" output buffering
            ob_start();
        }
    }
    ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php 
    echo htmlspecialchars($settings['title']);
    ?>
 - Error</title>
<style type="text/css">
<!--
body {margin: 10% 20% auto 20%; font: normal 62.5% Verdana, Arial, Helvetica, sans-serif}
#Open_LDbb-error {border: 1px solid #B84623}
h1 {margin: 0; color: #fff; background-color: #b84623; padding: 0.4em 1em; font-size: 1em}
h1 span {font-size: 1.2em}
#Open_LDbb-error div.errormessage {padding: 1em 1em 0.1em 1em; background-color: #f7f7f7}
#Open_LDbb-error p {padding: 0 0 1em 0; margin: 0;font-size: 1.1em}
#Open_LDbb-error p span {display: block}
-->
</style>
</head>
<body>

<div id="Open_LDbb-error">
	<h1 id="Open_LDbb-maintitle"><span>An error was encountered</span></h1>
	<div class="errormessage">
<?php 
    if (isset($message)) {
        echo '<p>' . $message . '</p>' . "\n";
    }
    if ($num_args > 1) {
        if (defined('OPENLD_DEBUG')) {
            if (isset($file) && isset($line)) {
                echo '<p><em>The error occurred on line ' . $line . ' in ' . $file . '</em></p>' . "\n";
            }
            $db_error = isset($GLOBALS['db']) ? $GLOBALS['db']->error() : array();
            if (!empty($db_error['error_msg'])) {
                echo '<p><strong>Database reported:</strong> ' . openld_htmlspecialchars($db_error['error_msg']) . ($db_error['error_no'] ? ' (Errno: ' . $db_error['error_no'] . ')' : '') . '.</p>' . "\n";
                if ($db_error['error_sql'] != '') {
                    echo '<p><strong>Failed query:</strong> <code>' . openld_htmlspecialchars($db_error['error_sql']) . '</code></p>' . "\n";
                }
            }
        } else {
            echo '<p><strong>Note:</strong> For detailed error information (necessary for troubleshooting), enable "DEBUG mode". To enable "DEBUG mode", open up the file config.php in a text editor, add a line that looks like "define(\'OPENLD_DEBUG\', 1);" (without the quotation marks), and re-upload the file. Once you\'ve solved the problem, it is recommended that "DEBUG mode" be turned off again (just remove the line from the file and re-upload it).</p>
				<p><strong>Report bug:</strong> If you believe that this error is due to a bug in the core of OpenLD, then you can <a href="http://sourceforge.net/tracker/?func=add&group_id=181014&atid=895496">file a bugreport</a> or just <a href="http://openld.org/forum/viewforum.php?forum_id=17">report the bug in the forum</a>.</p>' . "\n";
        }
    }
    ?>
	</div>
</div>

</body>
</html>
<?php 
    // If a database connection was established (before this error) we close it
    if (isset($GLOBALS['db'])) {
        $GLOBALS['db']->close();
    }
    exit;
}
Beispiel #13
0
echo DETAILS_DATE_SUBMITTED;
?>
</td>
				<td><?php 
echo $sql_objects[4];
?>
</td>
			</tr>
			<tr>
				<td><?php 
echo ID_LABEL;
?>
</td>
				<td><?php 
echo $sql_objects[0];
?>
</td>
			</tr>
			<tr>
				<td><?php 
echo DESCRIPTION_LABEL;
?>
</td>
				<td><?php 
echo openld_htmlspecialchars($sql_objects[2]);
?>
</td>
			</tr>
		</table>
	</div>
</div>
<br /> (
	<?php 
while ($sub_category_array = $db->fetch_assoc($sql)) {
    $category_link = openld_link('index_cat', array($sub_category_array['id'], str_replace(' ', '-', $sub_category_array['title'])));
    echo ($first == false ? ', ' : '') . '<a href="' . $category_link . '">' . openld_htmlspecialchars($sub_category_array['title']) . '</a>';
    $first = false;
}
?>
)<br />
Beispiel #15
0
								<option value="fpds"<?php 
echo 'fpds' == (isset($_REQUEST['directory_script']) ? $_REQUEST['directory_script'] : "0") ? ' selected="selected"' : '';
?>
>
									Free PHP Directory Script
								</option>
							</select>
						</td>
					</tr>
					<tr>
						<td>Database name to import from</td>
						<td><input type="text" value="<?php 
echo isset($_POST['database']) ? openld_htmlspecialchars($_POST['database']) : '';
?>
" name="database" id="start_input" /></td>
					</tr>
					<tr>
						<td>Prefix for database tables</td>
						<td><input type="text" value="<?php 
echo isset($_POST['prefix']) ? openld_htmlspecialchars($_POST['prefix']) : '';
?>
" name="prefix" /></td>
					</tr>
				</table>
				<br />
				<input type="submit" value="Import" />
			</div>
		</div>
	</div>
</div>
							<select name="id">
								<?php 
$cats = move_select_array(0, -1);
?>
								<?php 
foreach ($cats as $cat) {
    ?>
									<option value="<?php 
    echo $cat['id'];
    ?>
"<?php 
    echo $cat['id'] == (isset($_REQUEST['id']) ? $_REQUEST['id'] : "0") ? ' selected="selected"' : '';
    ?>
>
									<?php 
    echo openld_htmlspecialchars($cat['title']);
    ?>
									</option>
								<?php 
}
?>
							</select>
							<br />
							<?php 
echo $error->get_warning('category_warning');
?>
						</td>
					</tr>
					<?php 
($hook = get_hook('suggest_category_footer')) ? eval($hook) : null;
?>
        ?>
								<label>
									<?php 
        echo CENSORED_WORD;
        ?>
									<input type="text" name="edit_censored_word" value="<?php 
        echo openld_htmlspecialchars($rows['spam_word']);
        ?>
" size="24" maxlength="60" />
								</label>
								<label>
									<?php 
        echo REPLACE_WITH;
        ?>
									<input type="text" name="edit_replace_word" value="<?php 
        echo openld_htmlspecialchars($rows['replace_word']);
        ?>
" size="24" maxlength="60" />
								</label>
								<label>
									<?php 
        echo HARD_BAN;
        ?>
									<input type="checkbox" name="if_total_ban" <?php 
        echo $rows['ban_type'] == 'T' ? 'checked="CHECKED" ' : '';
        ?>
 />
								</label>
								<?php 
        ($hook = get_hook('admin_banned_words_cell_footer')) ? eval($hook) : null;
        ?>
			<td>
				<?php 
            ($hook = get_hook('admin_links_row_header')) ? eval($hook) : null;
            ?>
				<a href="<?php 
            echo openld_htmlspecialchars($links['url']);
            ?>
"><?php 
            echo openld_htmlspecialchars($links['title']);
            ?>
</a><?php 
            echo $links['payment_status'] == 'no' ? ' - <b>' . NOT_PAID . '</b>' : '';
            ?>
<br />
				<?php 
            echo openld_htmlspecialchars($links['description']);
            ?>
<br />
				<?php 
            echo SUBMITTED_LABEL;
            ?>
 <?php 
            echo $links['date_submitted'];
            ?>
<br />
				<a href="admin_links.php?move_link=<?php 
            echo $links['id'];
            ?>
&amp;page=<?php 
            echo $req_page;
            ?>
Beispiel #19
0
        echo NAME_LABEL;
        ?>
<br />
						<input type="text" value="<?php 
        echo isset($_REQUEST['com_name']) ? openld_htmlspecialchars($_REQUEST['com_name']) : '';
        ?>
" name="com_name" id="start_input" /><br /><?php 
        echo $error->get_warning('name_warning');
        ?>
<br /><br />
						<?php 
        echo LC_COMMENT_LABEL;
        ?>
<br />
						<textarea name="com_description" rows="15" cols="75"><?php 
        echo isset($_REQUEST['com_description']) ? openld_htmlspecialchars($_REQUEST['com_description']) : '';
        ?>
</textarea><br /><?php 
        echo $error->get_warning('description_warning');
        ?>
						<?php 
        echo $settings['use_antispam'] == 'Y' ? '<br /><br />Verification<br /><img src="' . $settings['domain'] . '/include/captcha.php"><br /><input type="text" value="" name="captcha" /><br />' . $error->get_warning('captcha_warning') : '';
        ?>
					</td>
				</tr>
			</table>
			<input type="hidden" name="link_id" value="<?php 
        echo $_REQUEST['comments'];
        ?>
" />
			<input type="submit" value="Send" />
            ?>
					</tr>
					<?php 
            ($hook = get_hook('admin_browse_links_row')) ? eval($hook) : null;
        }
        ?>
				</tbody>
			</table>
			<?php 
        echo link_pagination($links_result, $req_page, 'admin_browse.php?id=' . $req_id . '&amp;page=#p');
    } else {
        echo NO_LINKS_HERE;
        ($hook = get_hook('admin_browse_no_links')) ? eval($hook) : null;
    }
    ($hook = get_hook('admin_browse_after_sql_if')) ? eval($hook) : null;
    ?>
		<br />
		<a href="admin_browse.php?add_link=<?php 
    echo $req_id;
    ?>
&amp;category=<?php 
    echo isset($_REQUEST['category']) ? openld_htmlspecialchars($_REQUEST['category']) : 'root';
    ?>
"><?php 
    echo ADD_LINK_LABEL;
    ?>
</a>
	</div>
</div>
<?php 
}
function get_ext_title($ext_file)
{
    $ext_data = xml_to_array(@file_get_contents(OPENLD_ROOT . 'extensions/' . $ext_file . '/extension.xml'));
    $manifest_errors = validate_manifest($ext_data, $ext_file);
    return empty($manifest_errors) ? openld_htmlspecialchars($ext_data['extension']['title']) : $ext_file;
}