mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-23 03:17:23 +08:00
fix imdb class construct
This commit is contained in:
+1
-1
@@ -71,7 +71,7 @@ if ($CURUSER["id"] != $row["owner"]){
|
||||
$dt = sqlesc(date("Y-m-d H:i:s"));
|
||||
$subject = sqlesc($lang_delete_target[get_user_lang($row["owner"])]['msg_torrent_deleted']);
|
||||
$msg = sqlesc($lang_delete_target[get_user_lang($row["owner"])]['msg_the_torrent_you_uploaded'].$row['name'].$lang_delete_target[get_user_lang($row["owner"])]['msg_was_deleted_by']."[url=userdetails.php?id=".$CURUSER['id']."]".$CURUSER['username']."[/url]".$lang_delete_target[get_user_lang($row["owner"])]['msg_reason_is'].$reasonstr);
|
||||
sql_query("INSERT INTO messages (sender, receiver, subject, added, msg) VALUES(0, $row[owner], $subject, $dt, $msg)") or sqlerr(__FILE__, __LINE__);
|
||||
sql_query("INSERT INTO messages (sender, receiver, subject, added, msg) VALUES(0, {$row['owner']}, $subject, $dt, $msg)") or sqlerr(__FILE__, __LINE__);
|
||||
}
|
||||
stdhead($lang_delete['head_torrent_deleted']);
|
||||
|
||||
|
||||
+2
-3
@@ -272,7 +272,7 @@ $responseBody = $response->getBody();
|
||||
* @constructor imdb
|
||||
* @param string id
|
||||
*/
|
||||
function imdb ($id) {
|
||||
function __construct ($id) {
|
||||
$this->imdb_config();
|
||||
$this->setid($id);
|
||||
//if ($this->storecache && ($this->cache_expire > 0)) $this->purge();
|
||||
@@ -1159,7 +1159,7 @@ $responseBody = $response->getBody();
|
||||
/** Read the config
|
||||
* @constructor imdbsearch
|
||||
*/
|
||||
function imdbsearch() {
|
||||
function __construct() {
|
||||
$this->imdb_config();
|
||||
}
|
||||
|
||||
@@ -1213,7 +1213,6 @@ $responseBody = $response->getBody();
|
||||
if ($header = $be->getResponseHeader("Location")){
|
||||
if (strpos($header,$this->imdbsite."/find?")) {
|
||||
return $this->results($header);
|
||||
break(4);
|
||||
}
|
||||
#--- @moonface variant (not tested)
|
||||
# $idpos = strpos($header, "/Title?") + 7;
|
||||
|
||||
@@ -37,7 +37,7 @@ class imdb_config {
|
||||
* configuration data here.
|
||||
* @constructor imdb_config
|
||||
*/
|
||||
function imdb_config(){
|
||||
function __construct(){
|
||||
// protocol prefix
|
||||
$this->protocol_prefix = "http://";
|
||||
// the imdb server to use.
|
||||
@@ -80,7 +80,7 @@ require_once ("HTTP/Request2.php");
|
||||
|
||||
class IMDB_Request extends HTTP_Request2
|
||||
{
|
||||
function IMDB_Request($url){
|
||||
function __construct($url){
|
||||
parent::__construct($url);
|
||||
if ( PROXY != ""){
|
||||
$this->setConfig(array('proxy_host' => PROXY, 'proxy_port' => PROXY_PORT));
|
||||
|
||||
@@ -57,7 +57,7 @@ v1.0
|
||||
var $port;
|
||||
var $lastResponse = Array ();
|
||||
|
||||
function BrowserEmulator () {
|
||||
function __construct () {
|
||||
$this->resetHeaderLines ();
|
||||
$this->resetPort ();
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
class info_extractor{
|
||||
function info_extractor(){}
|
||||
function __construct(){}
|
||||
|
||||
/** truncate a given string
|
||||
* @method truncate
|
||||
|
||||
@@ -29,6 +29,7 @@ function oldReadConfig ($configname) {
|
||||
$configname = basename($configname);
|
||||
$path = './config/'.$configname;
|
||||
if (!file_exists($path)) {
|
||||
do_log($path);
|
||||
die("Error! File <b>".htmlspecialchars($configname)."</b> doesn't exist!</font><br /><font color=blue>Before the setup starts, please ensure that you have properly configured file and directory access permissions. Please see below.</font><br /><br />chmod 777 config/<br />chmod 777 config/".$configname);
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -46,8 +46,8 @@ elseif (isset($_GET["act"]) && $_GET["act"] == "edit"){
|
||||
print("<h1 align=center>Edit Rules</h1>");
|
||||
print("<form method=\"post\" action=\"modrules.php?act=edited\">");
|
||||
print("<table border=\"1\" cellspacing=\"0\" cellpadding=\"10\" align=\"center\">\n");
|
||||
print("<tr><td>Title:</td><td align=left><input style=\"width: 400px;\" type=\"text\" name=\"title\" value=\"".htmlspecialchars($res[title])."\" /></td></tr>\n");
|
||||
print("<tr><td style=\"vertical-align: top;\">Rules:</td><td><textarea cols=90 rows=20 name=\"text\">$res[text]</textarea></td></tr>\n");
|
||||
print("<tr><td>Title:</td><td align=left><input style=\"width: 400px;\" type=\"text\" name=\"title\" value=\"".htmlspecialchars($res['title'])."\" /></td></tr>\n");
|
||||
print("<tr><td style=\"vertical-align: top;\">Rules:</td><td><textarea cols=90 rows=20 name=\"text\">{$res['text']}</textarea></td></tr>\n");
|
||||
$s = "<select name=language>";
|
||||
$langs = langlist("site_lang");
|
||||
foreach ($langs as $row)
|
||||
|
||||
+4
-4
@@ -5,10 +5,10 @@ require_once(get_langfile_path());
|
||||
loggedinorreturn();
|
||||
parked();
|
||||
|
||||
$receiver = $_GET["receiver"];
|
||||
$receiver = intval($_GET["receiver"] ?? 0);
|
||||
int_check($receiver,true);
|
||||
|
||||
$replyto = $_GET["replyto"];
|
||||
$replyto = $_GET["replyto"] ?? '';
|
||||
if ($replyto && !is_valid_id($replyto))
|
||||
stderr($lang_sendmessage['std_error'],$lang_sendmessage['std_permission_denied']);
|
||||
|
||||
@@ -43,8 +43,8 @@ parked();
|
||||
begin_main_frame();
|
||||
print("<form id=compose name=\"compose\" method=post action=takemessage.php>");
|
||||
print("<input type=hidden name=receiver value=".$receiver.">");
|
||||
if ($_GET["returnto"] || $_SERVER["HTTP_REFERER"])
|
||||
print("<input type=hidden name=returnto value=\"".(htmlspecialchars($_GET["returnto"]) ? htmlspecialchars($_GET["returnto"]) : htmlspecialchars($_SERVER["HTTP_REFERER"]))."\">");
|
||||
if ((isset($_GET["returnto"]) && $_GET["returnto"]) || $_SERVER["HTTP_REFERER"])
|
||||
print("<input type=hidden name=returnto value=\"".(htmlspecialchars($_GET["returnto"] ?? '') ? htmlspecialchars($_GET["returnto"]) : htmlspecialchars($_SERVER["HTTP_REFERER"]))."\">");
|
||||
$title = $lang_sendmessage['text_message_to'].get_username($receiver);
|
||||
begin_compose($title, ($replyto ? "reply" : "new"), $body, true, $subject);
|
||||
print("<tr><td class=toolbox colspan=2 align=center>");
|
||||
|
||||
Reference in New Issue
Block a user