function send_to_identica(&$model, &$rec) { if (!get_profile_id()) { return; } // if the Record does not have a title or uri, bail out if (!isset($rec->title) || !isset($rec->uri)) { return; } if (get_option('identica_status') != 'enabled') { return; } // truncate the tweet at 140 chars $notice_content = substr($rec->title, 0, 140); // activate Twitter Tools $_GET['activate'] = true; // trip the init() function aktt_init(); // get the Twitter Tools object global $aktt; // make a new tweet object $tweet = new aktt_tweet(); // set the tweetbody $tweet->tw_text = stripslashes($notice_content); // send the dent to Identica global $db; $aktt->twitter_username = get_option('aktt_identica_username'); $aktt->twitter_password = md5_decrypt(stripslashes(get_option('aktt_identica_password')), $db->dbname); do_dent($tweet); }
function twitter_login_test() { global $db; $test = @aktt_login_test(@stripslashes(get_option('aktt_twitter_username')), @md5_decrypt(stripslashes(get_option('aktt_twitter_password')), $db->dbname)); if (strpos($test, 'succeeded')) { echo 1; } else { echo 0; } exit; }
?> &pag=edit&base=<?php echo $rs; ?> &id=<?php echo $x; ?> "><img src="images/icn_editar.gif" width="20" height="20" border="0"></a> <a href="<?php echo _CFG_USERINTERFACE_PHPMYADMIN; ?> ?pma_username=<?php echo $rs; ?> &pma_password=<?php echo md5_decrypt($datos['PASSWORD'], _CFG_INTERFACE_BLOWFISH); ?> " target="_blank"><img src="images/icn_mysql.gif" width="20" height="20" border="0"></a> <a href="webpanel/<?php echo $_GET['grupo']; ?> /<?php echo $_GET['seccion']; ?> /delete.php?id=<?php echo $x; ?> &base=<?php echo $rs; ?> " onclick="return confirmLink(this, '¿Desea borrar <?php
function UpdateHtaccess() { global $tc_db; $htaccess_contents = file_get_contents(KU_BOARDSDIR . '.htaccess'); $htaccess_contents_preserve = substr($htaccess_contents, 0, strpos($htaccess_contents, '## !KU_BANS:') + 12) . "\n"; $htaccess_contents_bans_iplist = ''; $results = $tc_db->GetAll("SELECT `ip` FROM `" . KU_DBPREFIX . "banlist` WHERE `allowread` = 0 AND `type` = 0 AND (`expired` = 1) ORDER BY `ip` ASC"); if (count($results) > 0) { $htaccess_contents_bans_iplist .= 'RewriteCond %{REMOTE_ADDR} ('; foreach ($results as $line) { $htaccess_contents_bans_iplist .= str_replace('.', '\\.', md5_decrypt($line['ip'], KU_RANDOMSEED)) . '|'; } $htaccess_contents_bans_iplist = substr($htaccess_contents_bans_iplist, 0, -1); $htaccess_contents_bans_iplist .= ')$' . "\n"; } if ($htaccess_contents_bans_iplist != '') { $htaccess_contents_bans_start = "<IfModule mod_rewrite.c>\nRewriteEngine On\n"; $htaccess_contents_bans_end = "RewriteRule !^(banned.php|youarebanned.jpg|favicon.ico|css/site_futaba.css)\$ " . KU_BOARDSFOLDER . "banned.php [L]\n</IfModule>"; } else { $htaccess_contents_bans_start = ''; $htaccess_contents_bans_end = ''; } $htaccess_contents_new = $htaccess_contents_preserve . $htaccess_contents_bans_start . $htaccess_contents_bans_iplist . $htaccess_contents_bans_end; file_put_contents(KU_BOARDSDIR . '.htaccess', $htaccess_contents_new); }
::::::::::::::::::::::::::::::::::::::::::::::::: ::::::::::::::::::::::::::::::::::::::::::::::::: :: :: :: Include required classes :: :: :: ::::::::::::::::::::::::::::::::::::::::::::::::: */ require_once "Captcha.class.php"; require_once "Functions.php"; /* ::::::::::::::::::::::::::::::::::::::::::::::::: :: :: :: And turn the http header into image/gif :: :: :: ::::::::::::::::::::::::::::::::::::::::::::::::: */ Header('Content-type: image/gif'); if ($dh = opendir("fonts/")) { while (false !== ($dat = readdir($dh))) { if ($dat != "." && $dat != "..") { $fonts[] = "fonts/{$dat}"; } } closedir($dh); } if ($_GET['uid']) { $UID = explode(";", $_GET['uid']); $IMG = new Captcha(md5_decrypt($UID[1]), $fonts[rand(0, count($fonts) - 1)], "8a8a8a"); echo $IMG->AnimatedOut(); }
include "webpanel/" . $_GET['grupo'] . "/include_permiso.php"; ?> <font face="Arial, Helvetica, sans-serif" size="2"> <?php require_once _CFG_INTERFACE_DIRMODULES . "mod_xmlconfig/include_funciones.php"; //Crea copia seguridad antes de modificar xmlconfig_backup(_CFG_XML_DOMINIOS); $conf = new patConfiguration(); $conf->setConfigDir(_CFG_XML_CONFIG_DIR); $conf->parseConfigFile(_CFG_XML_DOMINIOS, a); $datos = $conf->getConfigValue(xmlconfig_buscaid($_GET['id'], _CFG_XML_DOMINIOS)); $mDominio = $datos['DOMINIO']; $mBase = $datos['BASE']; $mUsuario = $datos['USUARIO']; $mPassword = md5_decrypt($datos['PASSWORD'], _CFG_INTERFACE_BLOWFISH); $mCuentas = $datos['CUENTAS']; $mRedirecciones = $datos['REDIRECCIONES']; $mAlias = $datos['ALIAS']; $mAutoRespuesta = $datos['AUTORESPUESTA']; $mLista = $datos['LISTA']; $mQuotaCORREO = $datos['QUOTACORREO']; $mQuotaFTP = $datos['QUOTAFTP']; echo "Generando hospedaje...<br>"; if (function_exists("apache_info")) { echo "Modulo mod_apache...<br>"; $variables = array(); $variables["APACHE_DOCUMENTROOT"] = _CFG_APACHE_DOCUMENTROOT . $mDominio; $variables["CFG_DOCUMENTROOT"] = _CFG_APACHE_DOCUMENTROOT . $mDominio; $variables["CFG_ESTADO"] = 1; $variables["APACHE_CGIBIN"] = 0;
} else { if ($post['message'] == '' && KU_NOMESSAGETHREAD != '') { $post['message'] = KU_NOMESSAGETHREAD; } } $post_class = new Post(0, $board_class->board['name'], $board_class->board['id'], true); $post_id = $post_class->Insert($thread_replyto, $post['name'], $post['tripcode'], $post['email'], $post['subject'], addslashes($post['message']), $upload_class->file_name, $upload_class->original_file_name, $filetype_withoutdot, $upload_class->file_md5, $upload_class->imgWidth, $upload_class->imgHeight, $upload_class->file_size, $upload_class->imgWidth_thumb, $upload_class->imgHeight_thumb, $post_passwordmd5, time(), time(), $_SERVER['REMOTE_ADDR'], $user_authority_display, $post['tag'], $sticky, $lock, $board_class->board['id']); if ($user_authority > 0 && $user_authority != 3) { $modpost_message = 'Modposted #<a href="' . KU_BOARDSFOLDER . $board_class->board['name'] . '/res/'; if ($post_isreply) { $modpost_message .= $thread_replyto; } else { $modpost_message .= $post_id; } $modpost_message .= '.html#' . $post_id . '">' . $post_id . '</a> in /' . $_POST['board'] . '/ with flags: ' . $flags . '.'; management_addlogentry($modpost_message, 1, md5_decrypt($_POST['modpassword'], KU_RANDOMSEED)); } if ($post['name_save'] && isset($_POST['name'])) { setcookie('name', urldecode($_POST['name']), time() + 31556926, '/', KU_DOMAIN); } if ($post['email_save']) { setcookie('email', urldecode($post['email']), time() + 31556926, '/', KU_DOMAIN); } setcookie('postpassword', urldecode($_POST['postpassword']), time() + 31556926, '/'); } else { exitWithErrorPage(_gettext('Could not copy uploaded image.')); } // If the user replied to a thread, and they weren't sage-ing it... if ($thread_replyto != '0' && strtolower($_POST['em']) != 'sage' && unistr_to_ords($_POST['em']) != array(19979, 12370)) { // And if the number of replies already in the thread are less than the maximum thread replies before perma-sage... if ($thread_replies <= $board_class->board['maxreplies']) {
$tinyboard_name = $kusaba["name"]; } $tinyboard_email = $kusaba['id']; $tinyboard_trip = $kusaba['id']; $tinyboard_capcode = $kusaba['id']; $tinyboard_body = $kusaba['id']; $tinyboard_body_nomarkup = $kusaba['id']; $tinyboard_time = $kusaba['timestamp']; $tinyboard_bump = $kusaba['bumped']; $tinyboard_thumb = $kusaba['file'] . "s.jpg"; $tinyboard_thumbwidth = $kusaba["thumb_w"]; $tinyboard_thumbheight = $kusaba["thumb_h"]; $tinyboard_file = $kusaba['id']; $tinyboard_filewidth = $kusaba['image_w']; $tinyboard_fileheight = $kusaba['image_h']; $tinyboard_filesize = $kusaba['id']; $tinyboard_filename = $kusaba['file_original'] . "." . $kusaba['file_type']; $tinyboard_filehash = $kusaba['id']; $tinyboard_password = $kusaba['id']; $tinyboard_ip = md5_decrypt($kusaba['ip'], "ywzwqcrlednu6f0tt6xbbwmeulevjq880zuyiv5w"); $tinyboard_sticky = $kusaba['stickied']; $tinyboard_locked = $kusaba['locked']; $tinyboard_sage = $kusaba['id']; $tinyboard_embed = $kusaba['id']; // Now add this post into TinyBoard's database $query = "INSERT INTO `posts` (`id`, `thread`, `subject`, `email`, `name`, `trip`, `capcode`, \n `body`, `body_nomarkup`, `time`, `bump`, `thumb`, `thumbwidth`, `thumbheight`, `file`, `filewidth`, \n `fileheight`, `filesize`, `filename`, `filehash`, `password`, `ip`, `sticky`, `locked`, `sage`, `embed`) \n VALUES\n (`{$tinyboard_id}`, `{$tinyboard_thread}`, `{$tinyboard_subject}`, `{$tinyboard_email}`, `{$tinyboard_name}`, \n `{$tinyboard_trip}`, `{$tinyboard_capcode}`, `{$tinyboard_body}`, `{$tinyboard_body_nomarkup}`, `{$tinyboard_time}`, `{$tinyboard_bump}`, `{$tinyboard_thumb}`, \n `{$tinyboard_thumbwidth}`, `{$tinyboard_thumbheight}`, `{$tinyboard_file}`, `{$tinyboard_filewidth}`, `{$tinyboard_fileheight}`, \n `{$tinyboard_filesize}`, `{$tinyboard_filename}`, `{$tinyboard_filehash}`, `{$tinyboard_password}`, \n `{$tinyboard_ip}`, `{$tinyboard_sticky}`, `{$tinyboard_locked}`, `{$tinyboard_sage}`, `{$tinyboard_embed}`)"; echo "\n{$query}\n"; } /* free result set */ mysqli_free_result($result); }
/** * 2ch●ログインの保存済みIDとPASSと自動ログイン設定を読み込む * * @access public * @return array|false */ function readIdPw2ch() { global $_conf; require_once P2_LIB_DIR . '/md5_crypt.funcs.php'; if (!file_exists($_conf['idpw2ch_php'])) { return false; } $rec_login2chID = null; $login2chPW = null; $rec_autoLogin2ch = null; include $_conf['idpw2ch_php']; // パスを複合化 if (!is_null($rec_login2chPW)) { $login2chPW = md5_decrypt($rec_login2chPW, P2Util::getMd5CryptPass()); } return array($rec_login2chID, $login2chPW, $rec_autoLogin2ch); }
function getip() { global $tc_db, $smarty, $tpl_page; if (!$this->CurrentUserIsModerator() && !$this->CurrentUserIsAdministrator()) { die; } $results = $tc_db->GetAll("SELECT HIGH_PRIORITY * FROM `" . KU_DBPREFIX . "boards` WHERE `name` = " . $tc_db->qstr($_GET['boarddir'])); if (count($results) > 0) { if (!$this->CurrentUserIsModeratorOfBoard($_GET['boarddir'], $_SESSION['manageusername'])) { die; } $ip = $tc_db->GetAll("SELECT HIGH_PRIORITY * FROM `" . KU_DBPREFIX . "posts` WHERE `boardid` = " . $tc_db->qstr($results[0]['id']) . " AND `id` = " . $tc_db->qstr($_GET['id'])); die("dnb-" . $_GET['boarddir'] . "-" . $_GET['id'] . "-" . ($ip[0]['parentid'] == 0 ? "y" : "n") . "=" . md5_decrypt($ip[0]['ip'], KU_RANDOMSEED)); } die; }
public static function UpdateHtaccess() { $htaccess_contents = file_get_contents(KX_BOARD . '.htaccess'); $htaccess_contents_preserve = substr($htaccess_contents, 0, strpos($htaccess_contents, '## !KU_BANS:') + 12) . "\n"; $htaccess_contents_bans_iplist = ''; $results = $kx_db->GetAll("SELECT `ip` FROM `" . kxEnv::Get('kx:db:prefix') . "banlist` WHERE `allowread` = 0 AND `type` = 0 AND (`expired` = 1) ORDER BY `ip` ASC"); if (count($results) > 0) { $htaccess_contents_bans_iplist .= 'RewriteCond %{REMOTE_ADDR} ('; foreach ($results as $line) { $htaccess_contents_bans_iplist .= str_replace('.', '\\.', md5_decrypt($line['ip'], kxEnv::Get('kx:misc:randomseed'))) . '|'; } $htaccess_contents_bans_iplist = substr($htaccess_contents_bans_iplist, 0, -1); $htaccess_contents_bans_iplist .= ')$' . "\n"; } if ($htaccess_contents_bans_iplist != '') { $htaccess_contents_bans_start = "<IfModule mod_rewrite.c>\nRewriteEngine On\n"; $htaccess_contents_bans_end = "RewriteRule !^(banned.php|youarebanned.jpg|favicon.ico|css/site_futaba.css)\$ " . kxEnv::Get('kx:paths:boards:folder') . "banned.php [L]\n</IfModule>"; } else { $htaccess_contents_bans_start = ''; $htaccess_contents_bans_end = ''; } $htaccess_contents_new = $htaccess_contents_preserve . $htaccess_contents_bans_start . $htaccess_contents_bans_iplist . $htaccess_contents_bans_end; file_put_contents(KX_BOARD . '.htaccess', $htaccess_contents_new); }
/** * Cookie(CID)からユーザ情報を得る * * @static * @access private * @return array|false 成功すれば配列、失敗なら false を返す */ function getCidInfo($cid) { global $_conf; require_once P2_LIB_DIR . '/md5_crypt.funcs.php'; $dec = md5_decrypt($cid, Login::getMd5CryptPassForCid()); $user = $time = $md5_utpx = null; list($user, $time, $md5_utpx) = split(':', $dec, 3); if (!strlen($user) || !$time || !$md5_utpx) { return false; } // 有効期限 日数 if (time() > $time + 60 * 60 * 24 * $_conf['cid_expire_day']) { return false; // 期限切れ } return array($user, $time, $md5_utpx); }
$chk_email_add = mysql_exec($sql_ex, 'single'); //var_dump($chk_email_add); die(); #/ Check If Account Exists if (empty($chk_email_add)) { $_SESSION["CUSA_ADMIN_MSG_GLOBAL"] = array(false, '<strong>INVALID Login Credentials.</strong> Please try again or contact Administrator.'); update_attempt_counts(); redirect_me("{$consts['DOC_ROOT_ADMIN']}recover_password.php", true); } else { if ($chk_email_add["is_active"] != '1') { $_SESSION["CUSA_ADMIN_MSG_GLOBAL"] = array(false, '<strong>Your Account is BLOCKED.</strong> Please contact Administrator.'); update_attempt_counts(); redirect_me("{$consts['DOC_ROOT_ADMIN']}recover_password.php", true); } else { #/ Process recovery $user_prof = format_str($chk_email_add); $pass = md5_decrypt($user_prof['pass_w']); $site_url = SITE_URL . 'back_adm/'; include_once '../../includes/send_mail.php'; $heading = "CUSA Admin - Password Recovery"; $body_in = ""; $body_in .= "Dear <b>{$user_prof['first_name']}</b>,<br /><br />"; $body_in .= "Your password has been recovered. Please use the following info to login to your account:<br /><br />"; $body_in .= "Password: {$pass}<br /><br />"; $body_in .= "You can use the following link to go to the Login page directly:<br />"; $body_in .= "<a href='{$site_url}login' target='_blank' style='color:#2CA1F4; text-decoration:none;'>{$site_url}login</a><br />"; $body_in .= "<br /><b>IMPORTANT</b>: "; $body_in .= "Please update your Password after you Login."; $body_in .= ""; //echo $body_in; die(); $to = $user_prof['email_add']; $subject = "Password Recovery from CUSA Admin";
public function userAuthority() { $user_authority = 0; if (isset($this->request['modpassword'])) { $results = $kx_db->GetAll("SELECT `type`, `boards` FROM `" . kxEnv::Get('kx:db:prefix') . "staff` WHERE `username` = '" . md5_decrypt($_POST['modpassword'], kxEnv::Get('kx:misc:randomseed')) . "' LIMIT 1"); if (count($results) > 0) { if ($results[0][0] == 1) { $user_authority = 1; // admin } elseif ($results[0][0] == 2 && in_array($board_class->board['name'], explode('|', $results[0][1]))) { $user_authority = 2; // mod } elseif ($results[0][0] == 2 && $results[0][1] == 'allboards') { $user_authority = 2; } } } return $user_authority; }
function identica_login_test() { global $db; $test = @dent_login_test(@stripslashes(get_option('aktt_identica_username')), @md5_decrypt(stripslashes(get_option('aktt_identica_password')), $db->dbname)); if ($test) { echo 1; } else { echo 0; } exit; }
die('You should not access this file directly'); } require_once W2P_BASE_DIR . '/includes/config.php'; require_once W2P_BASE_DIR . '/includes/main_functions.php'; require_once W2P_BASE_DIR . '/includes/db_adodb.php'; require_once W2P_BASE_DIR . '/lib/captcha/Functions.php'; $AppUI = new w2p_Core_CAppUI(); $defaultTZ = w2PgetConfig('system_timezone', 'UTC'); $defaultTZ = '' == $defaultTZ ? 'UTC' : $defaultTZ; date_default_timezone_set($defaultTZ); /* CAPTCHA control condition... */ $passed = false; if (strlen($_POST['spam_check']) > 0) { $cid = md5_decrypt($_POST['cid']); if ($cid == strtoupper($_POST['spam_check'])) { $passed = true; } else { header('Location: newuser.php?msg=data'); } } else { header('Location: newuser.php?msg=spam'); } if (w2PgetConfig('activate_external_user_creation') != 'true') { die('You should not access this file directly'); } $username = w2PgetParam($_POST, 'user_username', 0); $username = preg_replace("/[^A-Za-z0-9]/", "", $username); $user = new CAdmin_User(); $result = $user->loadAll(null, "user_username = '******'");
function GetUserAuthority() { global $tc_db, $board_class; $user_authority = 0; $flags = ''; if (isset($_POST['modpassword'])) { $results = $tc_db->GetAll("SELECT `type`, `boards` FROM `" . KU_DBPREFIX . "staff` WHERE `username` = '" . md5_decrypt($_POST['modpassword'], KU_RANDOMSEED) . "' LIMIT 1"); if (count($results) > 0) { if ($results[0][0] == 1) { $user_authority = 1; // admin } elseif ($results[0][0] == 2 && in_array($board_class->board['name'], explode('|', $results[0][1]))) { $user_authority = 2; // mod } elseif ($results[0][0] == 2 && $results[0][1] == 'allboards') { $user_authority = 2; } /* elseif ($results[0][0] == 3) { $user_authority = 3; // VIP }*/ if ($user_authority < 3) { /* set posting flags for mods and admins */ if (isset($_POST['displaystaffstatus'])) { $flags .= 'D'; } if (isset($_POST['lockonpost'])) { $flags .= 'L'; } if (isset($_POST['stickyonpost'])) { $flags .= 'S'; } if (isset($_POST['rawhtml'])) { $flags .= 'RH'; } if (isset($_POST['usestaffname'])) { $flags .= 'N'; } } } } return array($user_authority, $flags); }