function getFlashCode($adv_params, $max_width, $max_height) { extract($adv_params); if (!empty($width)) { if ($max_width > 0) { $width = $this->ife($width > $max_width, $max_width, $width); } } else { if (!empty($max_width)) { $width = $max_width; } else { $width = 100; } } if (!empty($height)) { if ($max_width > 0) { $height = $this->ife($height > $max_height, $max_height, $height); } } else { if (!empty($max_height)) { $height = $max_height; } else { $height = 100; } } $id = empty($id) ? pb_radom(3) : "flash-" . $id; if (empty($source_url)) { return 'This text is replaced by the Flash movie'; } return '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="' . $width . '" height="' . $height . '" id="' . ${$id} . '" align="middle"> <param name="allowScriptAccess" value="sameDomain" /> <param name="movie" value="' . $source_url . '" /> <param name="wmode" value="default" /> <param name="quality" value="high" /> <param name="bgcolor" value="#ffffff" /> <param name="base" value="' . URL . '" /> <embed src="' . $source_url . '" quality="high" bgcolor="#ffffff" width="' . $width . '" height="' . $height . '" name="mymovie" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer" /> </object>'; }
<?php /** * PHPB2B : Opensource B2B Script (http://www.phpb2b.com/) * Copyright (C) 2007-2010, Ualink. All Rights Reserved. * * Licensed under The Languages Packages Licenses. * Support : phpb2b@hotmail.com * * @version $Revision: 1393 $ */ require "../libraries/common.inc.php"; require "room.share.php"; $tplname = "invite"; $invitecode = authcode($_SESSION['MemberID'] . $time_stamp . pb_radom(6)); setvar("InviteCode", $invitecode); template($tplname);
pb_create_folder(DATA_PATH . "backup_" . $backupdir); } if ($do == "query" && !empty($_POST['sql_content'])) { if ($admin_runquery) { $result = sql_run($_POST['sql_content']); if ($result) { flash("success"); } else { flash(); } } else { flash("admin_runquery_forbidden"); } } if ($do == "backup") { $filename = date('ymd') . '_' . pb_radom(6); $db->query('SET SQL_QUOTE_SHOW_CREATE=0', 'SILENT'); $time = gmdate("M d Y H:i:s", mktime(date("H"), date("i"), date("s"), date("m"), date("d"), date("Y"))); $tables = arraykeys2(fetchtablelist($tb_prefix), 'Name'); if (mysql_get_server_info() > '4.1') { $db->query("set names '" . $dbcharset . "'"); } $backupfilename = DATA_PATH . "backup_" . $backupdir . DS . str_replace(array('/', '\\', '.'), '', $filename); $sqldump = ''; $tableid = 0; $startfrom = 0; for (; $tableid < count($tables); $tableid++) { $sqldump .= sqldumptable($tables[$tableid], $startfrom, strlen($sqldump)); $startfrom = 0; } $dumpfile = $backupfilename . '.sql';
$authed = true; } } } if (!empty($pb_user['pb_userid'])) { //if logined, check upload limit $attachment->is_image = true; $authed = true; } $attachment->if_thumb_large = false; $attachment->upload_dir = "swfupload" . DS . gmdate("Y") . gmdate("m") . DS . gmdate("d"); $str = $_FILES[$fileElementName]['name']; if (!empty($_FILES[$fileElementName]['name']) && $authed) { $attachment->if_thumb = false; $attachment->if_watermark = false; $attachment->rename_file = date("Hi") . pb_radom(); $attachment->upload_process(); if (empty($attachment->file_full_url)) { $return["error"] = $_FILES[$fileElementName]['error']; $return['msg'] = L("action_failed") . ":" . $_FILES[$fileElementName]['error']; } else { $return["error"] = ''; $return['file_url'] = $absolute_uri . $attachment_dir . "/" . $attachment->file_full_url; $return['msg'] = L("action_successfully"); $return['title'] = $_FILES[$fileElementName]['name']; } } else { $return["error"] = L("no_perm"); $return['msg'] = L("access_denied"); } ajax_exit($return);
function config_edit($configs) { global $dbcharset, $app_lang; if (!is_array($configs)) { return; } extract($configs); $configfile = PHPB2B_ROOT . 'configs' . DS . 'config.inc.php'; $configfiles = file_get_contents($configfile); $configfiles = trim($configfiles); $configfiles = preg_replace("/[\$]dbhost\\s*\\=\\s*[\"'].*?[\"'];/is", "\$dbhost = '{$dbhost}';", $configfiles); $configfiles = preg_replace("/[\$]app_lang\\s*\\=\\s*[\"'].*?[\"'];/is", "\$app_lang = '{$app_lang}';", $configfiles); $configfiles = preg_replace("/[\$]dbuser\\s*\\=\\s*[\"'].*?[\"'];/is", "\$dbuser = '******';", $configfiles); $configfiles = preg_replace("/[\$]dbpasswd\\s*\\=\\s*[\"'].*?[\"'];/is", "\$dbpasswd = '{$dbpasswd}';", $configfiles); $configfiles = preg_replace("/[\$]dbname\\s*\\=\\s*[\"'].*?[\"'];/is", "\$dbname = '{$dbname}';", $configfiles); $configfiles = preg_replace("/[\$]admin_email\\s*\\=\\s*[\"'].*?[\"'];/is", "\$admin_email = '{$admin_email}';", $configfiles); $configfiles = preg_replace("/[\$]tb_prefix\\s*\\=\\s*[\"'].*?[\"'];/is", "\$tb_prefix = '{$tb_prefix}';", $configfiles); $configfiles = preg_replace("/[\$]cookiepre\\s*\\=\\s*[\"'].*?[\"'];/is", "\$cookiepre = '" . pb_radom(3) . "_';", $configfiles); $configfiles = preg_replace("/[\$]absolute_uri\\s*\\=\\s*[\"'].*?[\"'];/is", "\$absolute_uri = '" . $absolute_uri . "';", $configfiles); if (file_put_contents($configfile, $configfiles)) { return true; } else { return false; } }
<?php include 'header.share.php'; if ($tb_prefix == "pb_") { $tb_prefix = "pb_" . strtolower(pb_radom(3)) . "_"; } ?> <div class="content"> <form id="install" name="myform" action="install.php?step=6&app_lang=<?php echo trim($_GET['app_lang']); ?> " method="post"> <input type="hidden" name="step" value="6"> <table width="100%" cellspacing="1" cellpadding="0" > <caption><?php echo $input_db_info; ?> </caption> <tr> <th width="30%" align="right" ><?php echo $db_host; ?> : </th> <td><label> <input name="dbhost" type="text" id="dbhost" value="<?php echo $dbhost; ?> " style="width:120px" /> </label></td> </tr>
<?php /** * [PHPB2B] Copyright (C) 2007-2099, Ualink Inc. All Rights Reserved. * The contents of this file are subject to the License; you may not use this file except in compliance with the License. * * @version $Revision: 2075 $ */ require "../libraries/common.inc.php"; require "room.share.php"; $tplname = "invite"; $invitecode = authcode($the_memberid . $time_stamp . pb_radom(6)); setvar("InviteCode", $invitecode); vtemplate($tplname);
$vals['transection_token'] = $token; $vals['transection_time'] = time(); $vals['transection_method'] = 'wap-tinhvan'; $vals['msisdn'] = $_SESSION['msisdn']; $vals['product_id'] = $pid; $vals['device_id'] = $device_id; $resul_s = $transection->save($vals); if ($resul_s == 1 && $token != "" && $token != "-1" && $token != "-2") { pheader("Location: " . $redirectUrl); } else { flash("Đăng ký giao dịch không thành công!"); } } } else { //Neu giao dich mien phi $token = pb_radom(24, 1); $vals['transection_token'] = $token; $vals['transection_time'] = time(); $vals['transection_method'] = 'free'; $vals['msisdn'] = $_SESSION['msisdn']; $vals['product_id'] = $pid; $vals['device_id'] = $device_id; $vals['status'] = 1; $resul_s = $transection->save($vals); if ($resul_s == 1) { flash("Quá trình mua game thành công!", "buy.php?t=" . $token, 3); } else { flash("Quá trình mua game không thành công", "content.php?id=" . $pid, 3); } } //ket thuc charing