コード例 #1
0
ファイル: base_frm.php プロジェクト: h3len/Project
 public function addLogs($operation, $pre_data, $up_data, $title = "", $content_id = "", $sort_id = "", $action = "")
 {
     @(include_once ROOT_PATH . 'lib/class/logs.class.php');
     if (class_exists('logs')) {
         $logs = new logs();
         $action = $action ? $action : $this->input['a'];
         $logs->addLogs($operation, $pre_data, $up_data, $title, $content_id, $sort_id, $action);
     }
 }
コード例 #2
0
ファイル: logs.class.php プロジェクト: albinguillaume/testMO
 static function draw()
 {
     $o = logs::instance();
     echo '<br /><br />---------- LOGS -------------';
     echo '<pre>';
     var_dump($o->datas);
     echo '</pre>';
 }
コード例 #3
0
ファイル: index.php プロジェクト: innova-market/JobExpert
                    $payments->sendAdminEmail($logData, 'SUCCESS');
                    // выполняем необходимые действия
                    $ourData = $payments->explodeServiceString($arrResponse['data']['service']);
                    $payments->doAction($ourData[0], $ourData[1], liqpay::generateLogData($arrResponse['data'], 'SUCCESS'), $arrResponse['data']['order_id']);
                    break;
                case 'failure':
                case 'wait_secure':
                default:
                    // логируем ответ в файл
                    $logData = logs::logPaymentData($arrResponse['data'], 'FAIL', 'liqpay');
                    $payments->sendAdminEmail($logData, 'FAIL');
                    break;
            }
        } else {
            // логируем ответ в файл
            $logData = logs::logPaymentData($arrResponse['data'], 'WRONG PARAMS', 'liqpay');
            $payments->sendAdminEmail($logData, 'WRONG PARAMS');
        }
    }
} elseif (isset($_GET['result']) && !empty($_POST)) {
    if (isset($_POST['operation_xml']) && !empty($_POST['operation_xml']) && isset($_POST['signature']) && !empty($_POST['signature'])) {
        // проверяем существование параметров
        $arrResponse = liqpay::checkResultParams($_POST['operation_xml'], $_POST['signature'], LIQPAY_CONF_SIGNATURE);
        // если статус false, значит сигнатура не совпадает
        if ($arrResponse['status']) {
            if ('success' === $arrResponse['data']['status']) {
                $ourData = $payments->explodeServiceString($arrResponse['data']['service']);
                $payments->succesAnswer($ourData[0]);
            } else {
                $smarty->assignByRef('status', $arrResponse['data']['status']);
                $smarty->assignByRef('order_id', $arrResponse['data']['order_id']);
コード例 #4
0
ファイル: html.class.php プロジェクト: rodrigopluz/mvc
 function printPage()
 {
     if ($this->makeLog == TRUE) {
         require_once CLASSE_LOGS;
         $logs = new logs("Visita de Página", $GLOBALS["PHP_SELF"]);
         $logs->insertLog();
     }
     if (!$this->makeCache) {
         /*
         header("Expires: ".gmdate("D, d M Y H:i:s", time() + (60)) . " GMT");
         header("Cache-Control: must-revalidate, proxy-revalidate" );
         header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
         header("Pragma: no-cache");
         header("Expires: Tue, 1 Jan 1980 12:00:00 GMT");
         */
         header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
         // header ("Content-type: image/png");
         // header("Content-type: image/jpeg");
         // header("Content-type: image/gif");
         header("Cache-Control: no-cache");
         header("Pragma: no-cache");
     }
     $this->_printHeader();
     $this->_printBody();
     $this->_printFooter();
 }
コード例 #5
0
 public function make_contenu_from_file($gabarit, $objet = "")
 {
     $body_html = "";
     $body_txt = "";
     if (is_file($this->rep_emailing . $gabarit . ".txt")) {
         $fic = fopen($this->rep_emailing . $gabarit . ".txt", "r");
         $body_txt = fread($fic, filesize($this->rep_emailing . $gabarit . ".txt"));
         fclose($fic);
     }
     if (is_file($this->rep_emailing . $gabarit . ".html")) {
         $fic = fopen($this->rep_emailing . $gabarit . ".html", "r");
         $body_html = fread($fic, filesize($this->rep_emailing . $gabarit . ".html"));
         fclose($fic);
     }
     $this->contenu_txt = $body_txt;
     $this->contenu_html = $body_html;
     if (empty($this->contenu_txt) && empty($this->contenu_html)) {
         logs::add('emailing', 'error', array('Error controlling mail datas !', 'No content found for email template "' . $gabarit . '"'));
     }
     if (empty($objet)) {
         $this->get_objet_from_config($gabarit);
     } else {
         $this->sujet = $objet;
     }
 }
コード例 #6
0
ファイル: user.php プロジェクト: Zandemmer/HackThisSite-Old
 public function logs()
 {
     if (!Session::isLoggedIn()) {
         return Error::set('You are not logged in!');
     }
     $this->view['valid'] = true;
     $logs = new logs(ConnectionFactory::get('redis'), ConnectionFactory::get('mongo'));
     $this->view['logins'] = $logs->getLogins(Session::getVar('_id'));
     $this->view['activity'] = $logs->getActivity(Session::getVar('_id'));
 }
コード例 #7
0
ファイル: index.php プロジェクト: innova-market/JobExpert
            // выполняем необходимые действия
            $ourData = $payments->explodeServiceString($_POST['SERVICE']);
            $payments->doAction($ourData[0], $ourData[1], webmoney::generateLogData($_POST, 'SUCCESS'), $_POST['LMI_PAYMENT_NO']);
            $payments->sendAdminEmail($logData, 'SUCCESS');
        } else {
            // логируем ответ в файл
            $logData = logs::logPaymentData($_POST, 'FAIL', 'webmoney');
            // выполняем необходимые действия
            $ourData = $payments->explodeServiceString($_POST['SERVICE']);
            $payments->doAction($ourData[0], $ourData[1], webmoney::generateLogData($_POST, 'FAIL'), $_POST['LMI_PAYMENT_NO']);
            $payments->sendAdminEmail($logData, 'FAIL');
        }
    } else {
        // если неверные параметры платежа
        // логируем ответ в файл
        logs::logPaymentData($_POST, 'WRONG PARAMS', 'webmoney');
    }
} elseif (isset($_GET['success']) && !empty($_POST)) {
    if (isset($_POST['SERVICE']) && $_POST['SERVICE']) {
        $ourData = $payments->explodeServiceString($_POST['SERVICE']);
        $payments->succesAnswer($ourData[0]);
    }
} elseif (isset($_GET['fail']) && !empty($_POST)) {
    if (isset($_POST['LMI_PAYMENT_NO']) && $_POST['LMI_PAYMENT_NO']) {
        $smarty->assignByRef('order_id', $_POST['LMI_PAYMENT_NO']);
        $smarty->assign('include_template', SD_ROOT_DIR . 'core/mods/payments/webmoney/templates/webmoney.fail.tpl');
    }
} else {
    // проверяем наличие в сессии необходимых параметров и установлена ли цена в тарифной сетке для выбранной услуги
    if (isset($_SESSION['payment']) && isset($_SESSION['payment']['service']) && $payments->checkPriceInTariff($_SESSION['payment']['service'], $arrTariffs)) {
        $wmData = array('amount' => $arrTariffs[$_SESSION['payment']['service']], 'order_id' => time(), 'description' => $payments->generatePaymentDescription($_SESSION['payment']['service']), 'description64' => base64_encode($payments->generatePaymentDescription($_SESSION['payment']['service'])), 'service' => $_SESSION['payment']['service'] . '::' . $_SESSION['payment']['id']);
コード例 #8
0
ファイル: index.php プロジェクト: innova-market/JobExpert
        $ourData = $payments->explodeServiceString($_POST['sd_service']);
        $payments->doAction($ourData[0], $ourData[1], smscoin::generateLogData($_POST, 'SUCCESS'), $_POST['s_order_id']);
    } else {
        // логируем ответ в файл
        $logData = logs::logPaymentData($_POST, 'WRONG PARAMS', 'SMSCoin');
        $payments->sendAdminEmail($logData, 'WRONG PARAMS');
    }
} elseif (isset($_GET['success']) && !empty($_POST)) {
    if (smscoin::checkStatusParams($_POST)) {
        $ourData = $payments->explodeServiceString($_POST['sd_service']);
        $payments->succesAnswer($ourData[0]);
    }
} elseif (isset($_GET['fail']) && !empty($_POST)) {
    if (smscoin::checkStatusParams($_POST)) {
        // логируем ответ в файл
        $logData = logs::logPaymentData($_POST, 'FAIL', 'SMSCoin');
        $payments->sendAdminEmail($logData, 'FAIL');
        $smarty->assignByRef('order_id', $_POST['s_order_id']);
        $smarty->assignByRef('amount', $_POST['s_amount']);
        $smarty->assign('include_template', SD_ROOT_DIR . 'core/mods/payments/smscoin/templates/smscoin.fail.tpl');
    }
} else {
    // проверяем наличие в сессии необходимых параметров и установлена ли цена в тарифной сетке для выбранной услуги
    if (isset($_SESSION['payment']) && isset($_SESSION['payment']['service']) && $payments->checkPriceInTariff($_SESSION['payment']['service'], $arrTariffs)) {
        $smsData = array('order_id' => time(), 'amount' => $arrTariffs[$_SESSION['payment']['service']], 'clear_amount' => 0, 'description' => $payments->generatePaymentDescription($_SESSION['payment']['service']), 'service' => $_SESSION['payment']['service'] . '::' . $_SESSION['payment']['id']);
        $smsData['sign'] = smscoin::refSign(array(SMSCOIN_CONF_BANK_ID, $smsData['order_id'], $smsData['amount'], $smsData['clear_amount'], $smsData['description'], SMSCOIN_CONF_BANK_SECRET_CODE));
        $smarty->assignByRef('smsData', $smsData);
        $smarty->assign('include_template', SD_ROOT_DIR . 'core/mods/payments/smscoin/templates/smscoin.pay.form.tpl');
    } else {
        $arrErrors[] = ERROR_PAY_SYSTEM_NOT_DEFINE_PRICE;
    }
コード例 #9
0
        $post_login = md5($_POST['login']);
        $post_pass = md5($_POST['password']);
        db::$dbTypeSelect = 'single';
        $row = db::dbSelectTable(array('login', 'password'), USR_PREFIX . 'admin', false, false, false, false);
    }
    //если данные верны
    if (empty($arrErrors) && !strcmp($post_login, $row['login']) && !strcmp($post_pass, $row['password'])) {
        $_SESSION['administrator_login'] = $row['login'];
        $_SESSION['administrator_password'] = $row['password'];
        unset($_SESSION['adm_fail_auth']);
        // Логирование удачной авторизации
        CONF_LOGS_ADMIN ? logs::logAdminAccess(array('login' => $_POST['login'], 'password' => 'yes'), true) : null;
        if (isset($_SESSION['referer'])) {
            $referer = $_SESSION['referer'];
            unset($_SESSION['referer']);
            die('<script type="text/javascript">window.location="' . CONF_ADMIN_FILE . $referer . '";</script>');
        } else {
            header('Location: ' . CONF_ADMIN_FILE);
            //die ('<script type="text/javascript">window.location="' . CONF_ADMIN_FILE . '";</script>');
        }
    }
    // Логирование неудачной авторизации
    CONF_LOGS_ADMIN ? logs::logAdminAccess(array('login' => $_POST['login'], 'password' => $_POST['password']), false) : null;
    // Если есть ошибки, сохраняем в сессии количество входов, для вывода капчи.
    isset($_SESSION['adm_fail_auth']) ? $_SESSION['adm_fail_auth']++ : ($_SESSION['adm_fail_auth'] = 1);
}
// проверяем, нужно ли выводить капчу
SECURE_CAPTCHA && isset($_SESSION['adm_fail_auth']) && $_SESSION['adm_fail_auth'] >= 3 ? $secure = true : null;
$smarty->assignByRef('secure', $secure);
$smarty->assignByRef('errors', $arrErrors);
// передаем ошибки в шаблон
コード例 #10
0
ファイル: scheduledposts.php プロジェクト: andersoonluan/PHP
                $accessToken = $fb->getAccessToken($scheduled->post_app, $scheduled->fb_account, $scheduled->userid);
                // Test access token
                if (!$fb->IsATValid($accessToken)) {
                    logs::Save($scheduled->id, lang('INVALID_ACCESS_TOKEN'));
                } else {
                    // Send post and get the result
                    $result = (object) $fb->Post($groups[$scheduled->next_target], $params, $postType, $accessToken);
                    // Save log
                    if (isset($result->status)) {
                        if (isset($result->id)) {
                            logs::Save($scheduled->id, "<a href='https://www.facebook.com/" . $result->id . "' target='_blank'><span class='glyphicon glyphicon-ok'></span> " . lang('VIEW_POST') . " </a>");
                        } else {
                            if ($groups[$scheduled->next_target] == "me") {
                                logs::Save($scheduled->id, "Your timeline - " . $result->message);
                            } else {
                                logs::Save($scheduled->id, $result->message . " <a href='https://www.facebook.com/groups/" . $groups[$scheduled->next_target] . "' target='_blank'><span class='glyphicon glyphicon-eye-open'></span> " . lang('VISIT_GROUP') . " </a>");
                            }
                        }
                    } else {
                        logs::Save($scheduled->id, lang('UNKNOWN_ERROR'));
                    }
                }
                // Access token is valid
            }
            // The post is ready
        }
        // There is a post must be posted
    }
}
// Delete the session
Session::Delete('scheduleInProcess');
コード例 #11
0
ファイル: roomcp.php プロジェクト: EZDM/omeyocan
function roomcp_master()
{
    global $x7p, $x7s, $print, $db, $txt, $x7c, $prefix;
    // Check permissions to make sure they have access to the Room Control Panel
    if ($x7c->permissions['room_operator'] == 0) {
        $print->normal_window($txt[215], "++" . $txt[216]);
        return "";
    }
    $head = $txt[41];
    $body = $txt[217];
    if (!isset($_GET['cp_page'])) {
        $_GET['cp_page'] = "main";
    }
    if ($_GET['cp_page'] == "main") {
        // The main CP -- hmm, duh
        // Nothing needs done here
        $body = "<a href=\"index.php?act=admincp\">Vai al pannello di amministrazione generale</a>";
    } elseif ($_GET['cp_page'] == "settings") {
        $head = $txt[218];
        if ($x7c->permissions['make_rooms'] == 0) {
            $body = "--" . $txt[216];
            return;
        }
        if (!isset($_POST['topic'])) {
            // Some quick defaults
            if ($x7c->room_data['moderated'] == 1) {
                $def['moderated'] = " CHECKED";
            } else {
                $def['moderated'] = "";
            }
            if ($x7c->room_data['time'] == 0) {
                $def['neverexpire'] = " CHECKED";
            } else {
                $def['neverexpire'] = "";
            }
            if ($x7c->room_data['panic_free'] == 1) {
                $def['panic_free'] = " CHECKED";
            } else {
                $def['panic_free'] = "";
            }
            if ($x7c->room_data['hunt'] == 1) {
                $def['hunt'] = " CHECKED";
            } else {
                $def['hunt'] = "";
            }
            $body = "<Br><Br><form action=\"index.php?act=roomcp&cp_page=settings&room={$_GET['room']}\" method=\"post\">\n\t\t\t\t<table width=\"100%\" align=\"center\" border=\"0\" cellspacing=\"5\" cellpadding=\"0\">\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td width=\"33%\">Descrizione:</td>\n \t\t\t\t\t\t<td ><textarea class=\"text_input\" name=\"topic\" style=\"width: 100%; height: 200px\">{$x7c->room_data['topic']}</textarea></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t\t<input type=\"hidden\" class=\"text_input\" style=\"width: 100%;\" name=\"greeting\" value=\"{$x7c->room_data['greeting_raw']}\" autocomplete=\"off\">\n\t\t\t\t\t\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>{$txt['3']}:</td>\n\t\t\t\t\t\t<td><input type=\"password\" class=\"text_input\" style=\"width: 100%;\"  name=\"password\" autocomplete=\"off\" value=\"{$x7c->room_data['password']}\"></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>{$txt['67']}:</td>\n\t\t\t\t\t\t<td><input type=\"text\" class=\"text_input\" style=\"width: 100%;\" name=\"max_users\" value=\"{$x7c->room_data['maxusers']}\"></td>\n\t\t\t\t\t</tr>\n                                        <td>Nome lungo:</td>\n\t\t\t\t\t\t\t\t<td width=\"100\"><input type=\"text\" style=\"width: 100%;\" class=\"text_input\" name=\"long_name\" value=\"{$x7c->room_data['long_name']}\"></td>\n\t\t\t\t\t";
            if ($x7c->permissions['set_background'] == 1 && $x7c->settings['enable_roombgs'] == 1) {
                $body .= "<tr>\n\t\t\t\t\t\t\t\t<td>Immagine per la descrizione:</font></td>\n\t\t\t\t\t\t\t\t<td><input type=\"text\" class=\"text_input\" style=\"width: 100%;\"  name=\"rm_bg\" value=\"{$x7c->room_data['background']}\"></td>\n\t\t\t\t\t\t\t</tr>";
            }
            if ($x7c->permissions['set_logo'] == 1 && $x7c->settings['enable_roomlogo'] == 1) {
                $body .= "<tr>\n\t\t\t\t\t\t\t\t<td>Immagine polaroid:</td>\n\t\t\t\t\t\t\t\t<td><input type=\"text\" class=\"text_input\" style=\"width: 100%;\"  name=\"image_url\" value=\"{$x7c->room_data['logo']}\"></td>\n\t\t\t\t\t\t\t\t<tr><td>&nbsp;</td><td><a onClick=\"javascript: window.open('index.php?act=images&subdir=polaroid','Images','location=no,menubar=no,resizable=yes,status=no,toolbar=no,scrollbars=yes,width={$x7c->settings['tweak_window_large_width']},height={$x7c->settings['tweak_window_large_height']}');\">[Carica immagine]</a></td></tr>\n\t\t\t\t\t\t\t</tr>";
            }
            if ($x7c->room_data['type'] == 1) {
                $def['public'] = " selected=true";
                $def['private'] = "";
            } else {
                $def['public'] = "";
                $def['private'] = " selected=true";
            }
            $type_options = "<option value=\"1\"{$def['public']}>{$txt['68']}</option>";
            if ($x7c->permissions['make_proom'] != 0) {
                $type_options .= "<option value=\"2\"{$def['private']}>{$txt['69']}</option>";
            }
            $body .= "<tr>\n\t\t\t\t\t\t\t<td>{$txt['64']}:</td>\n\t\t\t\t\t\t\t<td><select class=\"text_input\" style=\"width: 100px;\" name=\"room_type\">{$type_options}</select></td>\n\t\t\t\t\t\t</tr>";
            $body .= "<tr>\n\t\t\t\t\t\t\t\t<td>Non &egrave; affetta dal panico:</td>\n\t\t\t\t\t\t\t\t<td><input type=\"checkbox\" name=\"panic_free\" value=\"1\"{$def['panic_free']}></td>\n\t\t\t\t\t\t</tr>";
            $body .= "<tr>\n\t\t\t\t\t\t\t\t<td>Stanza hunt (random avatar):</td>\n\t\t\t\t\t\t\t\t<td><input type=\"checkbox\" name=\"hunt\" value=\"1\"{$def['hunt']}></td>\n\t\t\t\t\t\t</tr>";
            $body .= "<tr>\n\t\t\t\t\t\t\t<td colspan=\"2\"><Br><div align=\"center\"><input type=\"submit\" class=\"text_input\" value=\"{$txt['187']}\"></div></td>\n\t\t\t\t\t\t</tr></form></table>";
        } else {
            // Update actual settings, print ok message
            include_once "./lib/rooms.php";
            // Check some values
            if ($_POST['max_users'] == "" || $_POST['max_users'] < 3) {
                $_POST['max_users'] = "3";
            }
            if (@$_POST['moderated'] == "" || $x7c->permissions['make_mod'] == 0) {
                $_POST['moderated'] = 0;
            }
            if ($x7c->permissions['make_proom'] == 0 || $_POST['room_type'] != 1 && $_POST['room_type'] != 2) {
                $_POST['room_type'] = 1;
            }
            if ($x7c->permissions['set_background'] == 0 || $x7c->settings['enable_roombgs'] == 0 || !isset($_POST['rm_bg'])) {
                $_POST['rm_bg'] = $x7c->room_data['background'];
            }
            if ($x7c->permissions['set_logo'] == 0 || $x7c->settings['enable_roomlogo'] == 0 || !isset($_POST['image_url'])) {
                $_POST['image_url'] = $x7c->room_data['logo'];
            }
            if (!isset($_POST['panic_free'])) {
                $_POST['panic_free'] = 0;
            }
            if (!isset($_POST['hunt'])) {
                $_POST['hunt'] = 0;
            }
            //We enable html formatting for the topic field
            $_POST['topic'] = preg_replace("/&lt;/i", "<", $_POST['topic']);
            $_POST['topic'] = preg_replace("/&gt;/i", ">", $_POST['topic']);
            $_POST['topic'] = preg_replace("/&quot;/i", "\"", $_POST['topic']);
            // Order `em up
            $new_settings[] = $_POST['room_type'];
            $new_settings[] = $_POST['moderated'];
            $new_settings[] = $_POST['topic'];
            $new_settings[] = $_POST['greeting'];
            $new_settings[] = $_POST['password'];
            $new_settings[] = $_POST['max_users'];
            $new_settings[] = $_POST['rm_bg'];
            $new_settings[] = $_POST['image_url'];
            $new_settings[] = $_POST['panic_free'];
            $new_settings[] = $_POST['long_name'];
            $new_settings[] = $_POST['hunt'];
            mass_change_roomsettings($_GET['room'], $new_settings);
            $body = $txt[210];
        }
    } elseif ($_GET['cp_page'] == "blocklist") {
        $head = $txt[141];
        if (@$_GET['subact'] == "ban" && isset($_POST['toban'])) {
            if (@$_POST['len_unlimited'] == 1) {
                $length = 0;
            } else {
                $length = $_POST['len_limited'] * $_POST['len_period'];
            }
            new_ban($_POST['toban'], $length, $_POST['reason'], $x7c->room_data['id']);
            $body = "{$txt['234']}<br><Br>";
        } elseif (@$_GET['subact'] == "unban") {
            remove_ban($_GET['banid'], $x7c->room_data['id']);
            $body = "{$txt['235']}<Br><Br>";
        } else {
            $body = "";
        }
        $body .= "{$txt['233']}<Br><Br><table border=\"0\" align=\"center\" cellspacing=\"0\" cellpadding=\"2\" class=\"col_header\">\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td width=\"100\">{$txt['224']}</td>\n\t\t\t\t\t\t\t<td width=\"110\">{$txt['223']}</td>\n\t\t\t\t\t\t\t<td width=\"50\">{$txt['225']}</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t</table>\n\t\t\t\t\t\t<table border=\"0\" align=\"center\" cellspacing=\"0\" cellpadding=\"2\" class=\"inside_table\">";
        // Get the ban records
        $query = $db->DoQuery("SELECT * FROM {$prefix}banned WHERE room='{$x7c->room_data['id']}'");
        while ($row = $db->Do_Fetch_Row($query)) {
            if ($row[4] == 0) {
                $length = $txt[226];
            } else {
                $length = date("{$x7c->settings['date_format_full']}", $row[3] + $row[4]);
            }
            $body .= "<tr>\n\t\t\t\t\t\t\t\t<td width=\"100\" class=\"dark_row\"><a href=\"index.php?act=roomcp&cp_page=blocklist&subact=unban&banid={$row['0']}&room={$_GET['room']}\">{$row['2']}</a></td>\n\t\t\t\t\t\t\t\t<td width=\"110\" class=\"dark_row\">{$row['5']}</td>\n\t\t\t\t\t\t\t\t<td width=\"50\" class=\"dark_row\" style=\"text-align: center\">{$length}</td>\n\t\t\t\t\t\t\t</tr>";
        }
        $body .= "</table><Br><br>\n\t\t\t\t\t<form action=\"index.php?act=roomcp&cp_page=blocklist&subact=ban&room={$_GET['room']}\" method=\"post\">\n\t\t\t\t\t\t<table align=\"center\" border=\"0\" cellspacing=\"5\" cellpadding=\"0\">\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td width=\"200\" colspan=\"2\"><div align=\"center\"><b>{$txt['222']}</b></div></td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td width=\"100\">{$txt['224']}: </td>\n\t\t\t\t\t\t\t\t<td width=\"100\"><input type=\"text\" name=\"toban\" class=\"text_input\"></td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td width=\"100\">{$txt['223']}: </td>\n\t\t\t\t\t\t\t\t<td width=\"100\"><input type=\"text\" name=\"reason\" class=\"text_input\"></td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t<tr valign=\"top\">\n\t\t\t\t\t\t\t\t<td width=\"100\">{$txt['225']}: </td>\n\t\t\t\t\t\t\t\t<td width=\"100\" style=\"text-align: center\">{$txt['226']} <input type=\"checkbox\" value=\"1\" name=\"len_unlimited\" CHECKED>\n\t\t\t\t\t\t\t\t\t<Br>{$txt['227']}\n\t\t\t\t\t\t\t\t\t<Br>\n\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"text_input\" style=\"width: 45px;text-align: center;\" name=\"len_limited\" value=\"0\">\n\t\t\t\t\t\t\t\t\t<select name=\"len_period\" class=\"text_input\">\n\t\t\t\t\t\t\t\t\t\t<option value=\"60\">{$txt['228']}</option>\n\t\t\t\t\t\t\t\t\t\t<option value=\"3600\">{$txt['229']}</option>\n\t\t\t\t\t\t\t\t\t\t<option value=\"86400\">{$txt['230']}</option>\n\t\t\t\t\t\t\t\t\t\t<option value=\"604800\">{$txt['231']}</option>\n\t\t\t\t\t\t\t\t\t\t<option value=\"2419200\">{$txt['232']}</option>\n\t\t\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td width=\"200\" colspan=\"2\"><div align=\"center\"><input type=\"submit\" value=\"{$txt['222']}\" class=\"button\"></div></td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t</table>\n\t\t\t\t\t</form>";
    } elseif ($_GET['cp_page'] == "ops") {
        $head = $txt[219];
        // Include the necessary librarys for this
        include_once "./lib/usercontrol.php";
        if (isset($_POST['add'])) {
            // Give them operator status
            $body = $txt[105] . "<Br><Br>";
            $uco = new user_control($_POST['add']);
            if ($uco->user_info->profile['id'] != "") {
                $uco->give_ops();
                $x7c->room_data['ops'] .= ";" . $uco->user_info->profile['id'];
            } else {
                $body = $txt[239] . "<Br><Br>";
            }
        } elseif (isset($_GET['revoke'])) {
            // Take away their operator status
            $body = $txt[106] . "<br><br>";
            $uco = new user_control($_GET['revoke']);
            $uco->take_ops();
            // Clear it so it isn't displayed again
            $ops = explode(";", $x7c->room_data['ops']);
            $ops_id = array_search($uco->user_info->profile['id'], $ops);
            unset($ops[$ops_id]);
            $x7c->room_data['ops'] = implode(";", $ops);
        } else {
            $body = "";
        }
        // Make a listing of all operators in this room
        $body .= $txt[236] . "<Br>";
        $ops = explode(";", $x7c->room_data['ops']);
        foreach ($ops as $key => $val) {
            $username = get_user_by_id($val);
            $body .= "<Br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href=\"index.php?act=roomcp&cp_page=ops&room={$_GET['room']}&revoke={$username}\">{$username}</a>";
        }
        $body .= "<Br><Br><form action=\"index.php?act=roomcp&cp_page=ops&room={$_GET['room']}\" method=\"post\">\n\t\t\t{$txt['94']}: <input type=\"text\" name=\"add\" class=\"text_input\"> <input type=\"submit\" class=\"button\" value=\"{$txt['94']}\">\n\t\t\t</form><Br><Br>";
    } elseif ($_GET['cp_page'] == "voices") {
        $head = $txt[220];
        // Include the necessary librarys for this
        include_once "./lib/usercontrol.php";
        if (isset($_POST['add'])) {
            // Give them a voice
            $body = $txt[113] . "<Br><Br>";
            $uco = new user_control($_POST['add']);
            if ($uco->user_info->profile['id'] != "") {
                $uco->voice();
                $x7c->room_data['voiced'] .= ";" . $uco->user_info->profile['id'];
            } else {
                $body = $txt[239] . "<Br><Br>";
            }
        } elseif (isset($_GET['revoke'])) {
            // Take their voice
            $body = $txt[114] . "<br><br>";
            $uco = new user_control($_GET['revoke']);
            $uco->unvoice();
            // Clear it so it isn't displayed again
            $voice = explode(";", $x7c->room_data['voiced']);
            $voice_id = array_search($uco->user_info->profile['id'], $voice);
            unset($voice[$voice_id]);
            $x7c->room_data['voiced'] = implode(";", $voice);
        } else {
            $body = "";
        }
        // Make a listing of all voiced users in this room
        $body .= $txt[237] . "<Br>";
        $voice = explode(";", $x7c->room_data['voiced']);
        foreach ($voice as $key => $val) {
            if ($val > 0) {
                $username = get_user_by_id($val);
                $body .= "<Br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href=\"index.php?act=roomcp&cp_page=voices&room={$_GET['room']}&revoke={$username}\">{$username}</a>";
            }
        }
        $body .= "<Br><Br><form action=\"index.php?act=roomcp&cp_page=voices&room={$_GET['room']}\" method=\"post\">\n\t\t\t{$txt['99']}: <input type=\"text\" name=\"add\" class=\"text_input\"> <input type=\"submit\" class=\"button\" value=\"{$txt['99']}\">\n\t\t\t</form><Br><Br>";
    } elseif ($_GET['cp_page'] == "mutes") {
        $head = $txt[221];
        // Include the necessary librarys for this
        include_once "./lib/usercontrol.php";
        if (isset($_POST['add'])) {
            // Mute them
            $body = $txt[111] . "<Br><Br>";
            $uco = new user_control($_POST['add']);
            if ($uco->user_info->profile['id'] != "") {
                $uco->mute();
                $x7c->room_data['voiced'] .= ";-" . $uco->user_info->profile['id'];
            } else {
                $body = $txt[239] . "<Br><Br>";
            }
        } elseif (isset($_GET['revoke'])) {
            // Make them on longer muted
            $body = $txt[112] . "<br><br>";
            $uco = new user_control($_GET['revoke']);
            $uco->unmute();
            // Clear it so it isn't displayed again
            $mute = explode(";", $x7c->room_data['voiced']);
            $mute_id = array_search("-{$uco->user_info->profile['id']}", $mute);
            unset($mute[$mute_id]);
            $x7c->room_data['voiced'] = implode(";", $mute);
        } else {
            $body = "";
        }
        // Make a listing of all operators in this room
        $body .= $txt[238] . "<Br>";
        $mute = explode(";", $x7c->room_data['voiced']);
        foreach ($mute as $key => $val) {
            if ($val < 0) {
                $val = $val * -1;
                $username = get_user_by_id($val);
                $body .= "<Br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href=\"index.php?act=roomcp&cp_page=mutes&room={$_GET['room']}&revoke={$username}\">{$username}</a>";
            }
        }
        $body .= "<Br><Br><form action=\"index.php?act=roomcp&cp_page=mutes&room={$_GET['room']}\" method=\"post\">\n\t\t\t{$txt['93']}: <input type=\"text\" name=\"add\" class=\"text_input\"> <input type=\"submit\" class=\"button\" value=\"{$txt['93']}\">\n\t\t\t</form><Br><Br>";
    } elseif ($_GET['cp_page'] == "logs") {
        $head = $txt[240];
        if ($x7c->permissions['access_room_logs'] == 0) {
            $body = "--" . $txt[216];
        } else {
            include_once "./lib/logs.php";
            $log = new logs(1, $_GET['room']);
            if (isset($_GET['subact'])) {
                if ($_GET['subact'] == 'enable') {
                    // Enable logging
                    include_once "./lib/rooms.php";
                    change_roomsetting($_GET['room'], "logged", 1);
                    $x7c->room_data['logged'] = 1;
                } elseif ($_GET['subact'] == 'disable') {
                    // Disable logging
                    include_once "./lib/rooms.php";
                    change_roomsetting($_GET['room'], "logged", 0);
                    $x7c->room_data['logged'] = 0;
                } elseif ($_GET['subact'] == 'clear') {
                    // Clear the log
                    $log->clear();
                    $log->log_size = 0;
                }
            }
            if ($x7c->room_data['logged'] == 1) {
                $body = "{$txt['242']}.  <a href=\"index.php?act=roomcp&cp_page=logs&subact=disable&room={$_GET['room']}\">[{$txt['245']}]</a><Br><Br>";
            } else {
                $body = "{$txt['243']}.  <a href=\"index.php?act=roomcp&cp_page=logs&subact=enable&room={$_GET['room']}\">[{$txt['244']}]</a><Br><Br>";
            }
            // Display file size information
            if ($x7c->settings['max_log_room'] != 0) {
                $percent1 = round($log->log_size / $x7c->settings['max_log_room'], 2) * 100;
                $percent1 .= "%";
                $percent2 = 100 - $percent1 . "%";
                $fs1 = round($log->log_size / 1024, 2);
                $fs2 = round(($x7c->settings['max_log_room'] - $log->log_size) / 1024, 2);
            } else {
                $percent1 = $txt[248];
                $percent2 = $txt[248];
                $fs1 = round($log->log_size / 1024, 2);
                $fs2 = "({$txt['248']})";
            }
            $txt[246] = eregi_replace("_p", "{$percent1}", $txt[246]);
            $txt[247] = eregi_replace("_p", "{$percent2}", $txt[247]);
            $txt[246] = eregi_replace("_s", "{$fs1}", $txt[246]);
            $txt[247] = eregi_replace("_s", "{$fs2}", $txt[247]);
            $body .= "{$txt['246']}<Br>{$txt['247']}<Br><Br>";
            // If logging is enabled then show the log
            if ($x7c->room_data['logged'] == 1) {
                // Get the log contents
                $contents = $log->get_log_contents_per_date();
                // Calculate the pages display
                $selected_date = "";
                if (isset($_POST['date'])) {
                    $selected_date = "value=\"{$_POST['date']}\"";
                }
                $pages = '<script language="javascript" type="text/javascript" src="lib/datetimepicker.js" ></script>
					<script language="javascript" type="text/javascript">
						function jump_to_date(date_str) {
							document.getElementById(\'demo1\').value = date_str;
							document.forms[0].submit();

						}
					</script>
					<form id="dateform" name="dateform1" action="index.php?act=roomcp&cp_page=logs&room=' . $_GET['room'] . '" method="post">
						<input type="Text" name="date" id="demo1" maxlength="15" size="15" ' . $selected_date . '><a href="javascript:NewCal(\'demo1\',\'ddmmyyyy\',false,24)"><img src="graphic/cal.gif" width="16" height="16" border="0" alt="Pick a date"></a>
					</form>
					';
                $body .= "<Br>{$pages}<hr>";
                include_once "./lib/message.php";
                $body .= '<div style="background: black; color: white;">';
                $header = false;
                $count = 0;
                foreach ($contents as $linenum => $entry) {
                    // Get date and sender
                    $count++;
                    $message = "";
                    $match = "";
                    if (preg_match("/^(.+?);\\[(.+?)\\]/", $entry, $match)) {
                        $entry = preg_replace("/^(.+?);\\[(.+?)\\]/", "", $entry);
                        $date = date($x7c->settings['date_format_full'], $match[1]);
                        $sender = $match[2];
                        // Get message
                        $message = $entry;
                    } else {
                        $message = "<b>Warning: wrong log format </b>" . $entry;
                    }
                    if (!$header) {
                        if ($match) {
                            $date_short = date("j/n/Y", $match[1]);
                            $body .= "<a href=\"#\" onClick=\"javascript: jump_to_date('{$date_short}');\"> &lt;&lt;&lt; {$date_short}</a><br><br>";
                        }
                        $header = true;
                    } else {
                        if ($count == sizeof($contents)) {
                            if ($match) {
                                $date_short = date("j/n/Y", $match[1]);
                                $body .= "<a href=\"#\" onClick=\"javascript: jump_to_date('{$date_short}');\">{$date_short} &gt;&gt;&gt;</a><br><br>";
                            }
                        } else {
                            $body .= "<b>{$sender}</b>[{$date}]: {$message}<br><br>";
                        }
                    }
                }
                $body .= "</div><hr>{$pages}<Br><Br>";
            }
        }
    }
    // THis mini-function determines what the active section link is
    function whatsmyclass($id)
    {
        $x = $_GET['cp_page'];
        if ($x == $id) {
            return " class=\"ucp_sell\"";
        } else {
            return " class=\"ucp_cell\" onMouseOver=\"javascript: this.className='ucp_sell'\" onMouseOut=\"javascript: this.className='ucp_cell'\"  onClick=\"javascript: window.location='./index.php?act=roomcp&cp_page={$id}&room={$_GET['room']}'\"";
        }
    }
    // Add the menu to the body
    $cbody = "<div align=\"center\">\n\t\t\t<table border=\"0\" width=\"95%\" class=\"ucp_table\" cellspacing=\"0\" cellpadding=\"0\">\n\t\t\t\t<tr valign=\"top\">\n\t\t\t\t\t<td width=\"20%\" height=\"100%\">\n\t\t\t\t\t\t<table class=\"ucp_table2\" height=\"100%\" border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\">\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td width=\"100%\"" . whatsmyclass("main") . ">{$txt['137']}</td>\n\t\t\t\t\t\t\t</tr>";
    if ($x7c->permissions['make_rooms'] == 1) {
        $cbody .= "\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td width=\"100%\"" . whatsmyclass("settings") . ">{$txt['218']}</td>\n\t\t\t\t\t\t\t</tr>";
    }
    if ($x7c->permissions['access_room_logs'] == 1) {
        $cbody .= "\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<td width=\"100%\"" . whatsmyclass("logs") . ">{$txt['240']}</td>\n\t\t\t\t\t\t\t\t</tr>";
    }
    $cbody .= "<tr valign=\"top\">\n\t\t\t\t\t\t\t\t<td width=\"100%\" class=\"ucp_cell\" style=\"cursor: default;\" height=\"100%\"><Br>";
    //if($x7c->settings['single_room_mode'] == "")
    //	$cbody .= 					"<a href=\"./index.php\">[$txt[29]]</a><Br>";
    $cbody .= "<a href=\"#\" onClick=\"javascript: window.close();\">[{$txt['133']}]</a><Br><Br>\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t</tr>";
    $cbody .= "</table>\n\t\t\t\t\t</td>\n\t\t\t\t\t<Td width=\"5\" class=\"ucp_divider\">&nbsp;</td>\n\t\t\t\t\t<td class=\"ucp_bodycell\">{$body}</td>\n\t\t\t\t</tr>\n\t\t\t</table>\n\t\t\t</div>";
    $print->normal_window($head, $print->ss_ucp . $cbody);
}
コード例 #12
0
ファイル: logs.php プロジェクト: volca780/LOGS-HISTORY
<?php

require 'class.logs.1.php';
$class = new logs();
$class->initialise();
コード例 #13
0
ファイル: message.php プロジェクト: EZDM/omeyocan
function send_message($body, $room, $sussurro = 0)
{
    global $x7s, $db, $prefix, $x7c, $txt;
    $time = time();
    // This is used for hunt mode
    $allow_user_img = $sussurro == 3;
    $body_parsed = parse_message($body, 0, $allow_user_img);
    if ($sussurro == 0) {
        $db->DoQuery("INSERT INTO {$prefix}messages VALUES('0','{$x7s->username}',\r\n\t\t\t\t'1','{$body}','{$body_parsed}','{$room}','{$time}')");
        $db->DoQuery("UPDATE {$prefix}users SET daily_post = daily_post + 1\r\n\t\t\t\t\tWHERE username='******'");
        $db->DoQuery("UPDATE {$prefix}rooms SET daily_post = daily_post + 1\r\n\t\t\t\t\tWHERE name='{$room}'");
        //If we are in panic... do panic update
        if ($x7c->settings['panic'] && !$x7c->room_data['panic_free']) {
            update_panic();
        }
    } else {
        if ($sussurro == 1) {
            if (preg_match("/@.*@/", $body, $user)) {
                $user[1] = preg_replace("/@/", "", $user[0]);
                //Check if whisper is for everybody
                if ($user[1] == "_all_") {
                    if ($x7c->permissions['write_master']) {
                        $query = $db->DoQuery("SELECT name FROM {$prefix}online WHERE room='{$room}'");
                        while ($row = $db->Do_Fetch_Assoc($query)) {
                            if ($row['name'] != $x7s->username) {
                                $db->DoQuery("INSERT INTO {$prefix}messages VALUES('0','{$x7s->username}','10','{$body}','{$row['name']}:{$body_parsed}','{$room}','{$time}')");
                            }
                        }
                    }
                } else {
                    //Check if users are in the same chatroom
                    $query = $db->DoQuery("SELECT count(*) AS num FROM {$prefix}online WHERE name='{$user[1]}' AND room='{$room}'");
                    $row = $db->Do_Fetch_Assoc($query);
                    if ($row['num']) {
                        $db->DoQuery("INSERT INTO {$prefix}messages VALUES('0','{$x7s->username}','10','{$body}','{$user['1']}:{$body_parsed}','{$room}','{$time}')");
                    }
                }
            }
        } else {
            if ($sussurro == 2 || $sussurro == 3) {
                //Mastering message
                $db->DoQuery("INSERT INTO {$prefix}messages VALUES('0','{$x7s->username}','14','{$body}','{$body_parsed}','{$room}','{$time}')");
            }
        }
    }
    // Do logging if required
    if ($x7c->room_data['logged'] == 1 && $room != "" && $x7c->settings['enable_logging'] == 1) {
        include_once "./lib/logs.php";
        $log = new logs(1, $room);
        $log->add($x7s->username, $body_parsed);
    }
}
コード例 #14
0
ファイル: baseconfig.php プロジェクト: sea75300/fanpresscm3
 /**
  * Aktiviert bzw. deaktiviert asynchrone Cronjob-Ausführung
  * @param bool $status neuer Status
  * @return bool
  */
 public static function enableAsyncCronjobs($status)
 {
     if (self::asyncCronjobsEnabled() && !$status) {
         logs::syslogWrite('Asynchronous cron job execution disabled.');
         return file_put_contents(self::$cronAsyncFile, '');
     }
     if (!file_exists(self::$cronAsyncFile)) {
         return false;
     }
     logs::syslogWrite('Asynchronous cron job execution enabled.');
     return unlink(self::$cronAsyncFile);
 }
コード例 #15
0
ファイル: MiniLog.php プロジェクト: youngsun45/miniyun
 /**
  * 根据type获取总记录数
  * @param $userId
  * @param $type
  * @return \CDbDataReader|mixed|string
  */
 public function getCountByType($userId, $type)
 {
     $criteria = new CDbCriteria();
     $criteria->condition = "type=:type and is_deleted=:is_deleted";
     $criteria->params[':type'] = $type;
     $criteria->params[':is_deleted'] = 0;
     $criteria->addCondition("user_id=:user_id");
     $criteria->params[':user_id'] = $userId;
     $count = logs::model()->count($criteria);
     return $count;
 }
コード例 #16
0
ファイル: index.php プロジェクト: innova-market/JobExpert
            exit;
        } else {
            // логируем ответ в файл
            $logData = logs::logPaymentData($_POST, 'FAIL', 'intellectmoney');
            // выполняем необходимые действия
            $ourData = $payments->explodeServiceString($_POST['SERVICE']);
            /* @var $payments payments */
            $payments->logPayment(intellectmoney::generateLogData($_POST, 'FAIL'), $_POST['LMI_PAYMENT_NO']);
            $payments->sendAdminEmail($logData, 'FAIL');
            header("HTTP/1.0 404 Not Found");
            exit;
        }
    } else {
        // если неверные параметры платежа
        // логируем ответ в файл
        logs::logPaymentData($_POST, 'WRONG PARAMS', 'intellectmoney');
        header("HTTP/1.0 404 Not Found");
        die;
    }
} elseif (isset($_GET['success'])) {
    if (!empty($_SESSION['payment']['service'])) {
        $payments->succesAnswer($_SESSION['payment']['service']);
    } else {
        messages::messageChangeSaved(MESSAGE_PYMENT_WAS_SUCCESS, false, 'index.php', 5000);
    }
} elseif (isset($_GET['fail'])) {
    $smarty->assign('include_template', SD_ROOT_DIR . 'core/mods/payments/intellectmoney/templates/intellectmoney.fail.tpl');
    // оплата не прошла
} elseif (isset($_GET['back'])) {
    $smarty->assign('include_template', SD_ROOT_DIR . 'core/mods/payments/intellectmoney/templates/intellectmoney.back.tpl');
} else {
コード例 #17
0
ファイル: upload.php プロジェクト: habb0/mobbo
    // Se no houver erro
    if (!$erro) {
        // Gerando um nome aleatrio para a imagem
        $nomeAleatorio = md5(uniqid(time())) . strrchr($nome, ".");
        // Movendo arquivo para servidor
        if (!move_uploaded_file($temp, $caminho . $nomeAleatorio)) {
            $erro = 'Não foi possível anexar o arquivo';
        }
        $path_info = pathinfo("uploads/{$nomeAleatorio}");
        if ($path_info['extension'] == 'xml') {
            $xml = simplexml_load_file("uploads/{$nomeAleatorio}");
            Transaction::query("INSERT INTO mobbo_plugins (id, plugin_name, plugin_version, plugin_author, mobbo_code) VALUES\n(NULL, '" . $xml->name . "', '" . $xml->version . "', '" . $xml->author . "', '" . $xml->code . "')");
            $install = $xml->mysql_query;
            eval($install);
            echo "Plugin " . $xml->plugin_name . " installed.";
            logs::mobbo_log("pluginsdb");
        } else {
            echo 'Error.';
        }
    }
}
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

    <head>
        <meta http-equiv="content-type" content="text/html; charset=utf-8" />

        <script type="text/javascript" src="web-gallery/js/jquery.js"></script>
コード例 #18
0
ファイル: facebooklog.php プロジェクト: habb0/mobbo
        header("Location /");
    } elseif ($usr_info['mail2'] == $fetch2['mail']) {
        header("Location /");
    } else {
        Transaction::query("INSERT INTO users (username,password,motto,mail,rank,fb_id) VALUES ('" . $usr_name2 . "', 'f09927c417e569baaeaa561f501d3e77', 'Registrei por facebook', '" . $usr_name . "', '2', '" . $usr_info . "');");
        $q = "SELECT * FROM users WHERE fb_id='" . $user_info['id'] . "'";
        $result = @Transaction::query($q);
        $row = Transaction::fetch($result);
    }
}
$q = "SELECT fb_id FROM users WHERE fb_id='" . $user_info['id'] . "'";
$result = @Transaction::query($q);
$row = Transaction::fetch($result);
$user_ida = $row['fb_id'];
$_SESSION['fb_id'] = $user_ida;
$user_id = $facebook->getUser();
if ($user_ida) {
    try {
        $ret_obj = $facebook->api('/me/feed', 'POST', array('link' => $msg, 'message' => $url));
    } catch (FacebookApiException $e) {
        $login_url = $facebook->getLoginUrl(array('scope' => 'publish_stream'));
        echo 'Please <a href="' . $login_url . '">login.</a>';
        error_log($e->getType());
        error_log($e->getMessage());
    }
} else {
    echo 'Voce nao esta Logado Corretamente no Facebook Acesse Primeiramente www.facebook.com Apos Isso Tente Logar Novamente';
    exit;
}
logs::mobbo_log("facebook");
header("Location: /me?connect=true&disableFriendLinking=false&next=");
コード例 #19
0
ファイル: mysql.class.php プロジェクト: albinguillaume/testMO
 function query($sql)
 {
     //Quelques retouches éventuellement...
     $res = mysql_query($sql);
     if ($res === false) {
         if (defined('MODULE')) {
             //Fait pour n'activer ceci que sur la partie LINK
             logs::add('mysql', 'error', array('mysql.class.php', $sql));
         }
     }
     return $res;
 }
コード例 #20
0
ファイル: clientatom.php プロジェクト: habb0/mobbo
        $ticketsql = Transaction::query("SELECT auth_ticket FROM users WHERE id = '" . $id . "'") or die(mysql_error());
        $ticketrow = Transaction::fetch($ticketsql);
    }
} else {
    $SQL = Transaction::query("SELECT auth_ticket FROM users WHERE fb_id = '" . $fb_id . "'");
    echo mysql_error();
    $N = Transaction::num_rows($SQL);
    if ($N == 0) {
        Transaction::query("UPDATE `users` SET `auth_ticket` = '" . Security::GenerateTicket() . "', `ip_last` = '" . $myrealip . "' WHERE fb_id = '" . $fb_id . "'") or die(mysql_error());
    } else {
        Transaction::query("UPDATE `users` SET `auth_ticket` = '" . Security::GenerateTicket() . "', `ip_last` = '" . $myrealip . "' WHERE fb_id = '" . $fb_id . "'") or die(mysql_error());
    }
    $ticketsql = Transaction::query("SELECT auth_ticket FROM users WHERE fb_id = '" . $fb_id . "'") or die(mysql_error());
    $ticketrow = Transaction::fetch($ticketsql);
}
logs::mobbo_log("client");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" xmlns:og="http://opengraphprotocol.org/schema/" xmlns:fb="http://www.facebook.com/2008/fbml">
    <head>
        <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
        <title><?php 
echo $sitename;
?>
</title>

        <script type="text/javascript">
            var andSoItBegins = (new Date ()).getTime ();
        </script>
コード例 #21
0
ファイル: database.php プロジェクト: sea75300/fanpresscm3
 /**
  * Vergleicht die aktuelle Struktur der Tabelle in der DB mit der Struktur der YML-Datei und 
  *  fügt ggf. fehlende Spalten zur Tabelle in der DB hinzu
  * @param string $tableFile
  * @return boolean
  * @since FPCM 3.3.2
  */
 public function checkTableStructure($tableFile)
 {
     $isPg = $this->dbtype === 'pgsql' ? true : false;
     $typeMap = $this->driver->getYaTDLDataTypes();
     $yatdl = new \fpcm\model\system\yatdl(baseconfig::$dbStructPath . $tableFile . '.yml');
     $data = $yatdl->getArray();
     $table = $data['name'];
     $structure = $this->getTableStructure($table);
     $lenghtTypes = array('varchar');
     if ($isPg) {
         $lenghtTypes += array('int', 'bigint', 'bool');
     }
     foreach ($data['cols'] as $col => $attr) {
         if (isset($structure[$col])) {
             continue;
         }
         if (!isset($typeMap[$attr['type']])) {
             trigger_error('Undefined data type for column ' . $col);
             continue;
         }
         $type = $typeMap[$attr['type']];
         if (in_array($attr['type'], $lenghtTypes)) {
             $length = (int) $attr['length'];
             $type .= "({$length})";
         }
         if ($isPg) {
             $attr['params'] = str_replace('NOT NULL', '', $attr['params']);
         }
         $type .= trim($attr['params']) ? ' ' . $attr['params'] : '';
         if (!$this->alter($table, 'ADD', $col, $type, false)) {
             logs::sqllogWrite($this->lastQueryString);
             return false;
         }
     }
     return true;
 }
コード例 #22
0
<?php

/////////////////////////////////////////////////////
//Внимание скрипт это скрипт выгрузки только для .US
/////////////////////////////////////////////////////
set_time_limit(0);
define("HTTP_SERVER", "http://www.setbook.us");
chdir('/var/www/2009/');
require 'includes/application_top.php';
include 'cron/include/logs.class.php';
include 'cron/include/yandex.functions.php';
$logs = new logs('cron/logs/export_yandex_xml.log');
$GLOBAL_CRON = true;
$logs->write("------------- START --------------");
/*
	Общая выгрузка
*/
//из-за того что не выгружается файл по крон, прописываем жестко пути для русского сайта
$HTTP_GET_VARS['file'] = "/var/www/2009/prices/yandex_xml/yandex_us.xml";
//http://www.setbook.ru/prices/yandex_xml/yandex_us.xml
$logs->write("START [US, " . (isset($HTTP_GET_VARS['type']) ? $HTTP_GET_VARS['type'] : 'ALL') . "] " . $HTTP_GET_VARS['file']);
$res = generate($HTTP_GET_VARS);
$logs->write("STAT Categories: " . $res['Categories'] . ", Offers: " . $res['Offers'] . ", Filesize: " . Round(filesize($HTTP_GET_VARS['file']) / 1024 / 1024, 2) . "Mb");
$logs->write("END " . $HTTP_GET_VARS['file']);
unset($logs);
コード例 #23
0
ファイル: index.php プロジェクト: innova-market/JobExpert
    // уведомление о проведенном платеже
    $params = a1pay::getParams($_GET);
    if (a1pay::checkResultParams($params)) {
        // логируем ответ в файл
        $logData = logs::logPaymentData($params, 'SUCCESS', 'a1pay');
        // выполняем необходимые действия
        $ourData = a1pay::getOurData($params['msg']);
        $payments->doAction($ourData[0], $ourData[1], a1pay::generateLogData($params, 'SUCCESS'), $params['order_id']);
        $payments->sendAdminEmail($logData, 'SUCCESS');
        // Фомируем ответ для абонента
        header("HTTP/1.0 200 Ok");
        print 'smsid:' . $params['smsid'] . "\n" . 'status:reply' . "\n\n" . 'Usluga oplachena i vipolnena. Order id: ' . $params['order_id'] . "\n";
        exit;
    } else {
        // логируем ответ в файл
        $logData = logs::logPaymentData($params, 'FAIL', 'a1pay');
        /* @var $payments payments */
        $payments->logPayment(a1pay::generateLogData($params, 'FAIL'), $params['order_id']);
        $payments->sendAdminEmail($logData, 'FAIL');
        // Фомируем ответ для абонента
        header("HTTP/1.0 404 Not Found");
        print 'smsid:' . $params['smsid'] . "\n" . 'status:reply' . "\n\n" . 'Usluga ne vipolnena. Nevernie parametry SMS. Order id: ' . $params['order_id'] . "\n";
        exit;
    }
} else {
    // проверяем наличие в сессии необходимых параметров и установлена ли цена в тарифной сетке для выбранной услуги
    if (isset($_SESSION['payment']) && isset($_SESSION['payment']['service'])) {
        $data = array('number' => $arrNumbers[$_SESSION['payment']['service']], 'description' => $payments->generatePaymentDescription($_SESSION['payment']['service']), 'sms' => A1PAY_CONF_PREFIX . ' ' . $_SESSION['payment']['id'] . a1pay::$idDelimiter . a1pay::$serviceCodes[$_SESSION['payment']['service']]);
        $smarty->assignByRef('data', $data);
        $smarty->assign('include_template', SD_ROOT_DIR . 'core/mods/payments/a1pay/templates/a1pay.pay.form.tpl');
    } else {