コード例 #1
0
 public function displayCustomPageLink()
 {
     $customPageObj = new Basic($this->MySQL, "custompages", "custompage_id");
     $menuCustomPageInfo = $this->menuItemObj->objCustomPage->get_info();
     $customPageObj->select($menuCustomPageInfo['custompage_id']);
     echo "\n\t\t\t<div style='text-align: " . $menuCustomPageInfo['textalign'] . "'>\n\t\t\t" . $menuCustomPageInfo['prefix'] . "<a href='" . MAIN_ROOT . "custompage.php?pID=" . $menuCustomPageInfo['custompage_id'] . "' target='" . $menuCustomPageInfo['linktarget'] . "'>" . $customPageObj->get_info_filtered("pagename") . "</a>\n\t\t\t</div>\n\t\t\t";
 }
コード例 #2
0
ファイル: revokemedal.php プロジェクト: nsystem1/clanscripts
function revokeMedalSave()
{
    global $mysqli, $member, $medalObj, $memberInfo, $formObj;
    $revokeMedalObj = new Basic($mysqli, "medals_members", "medalmember_id");
    $arrMemberMedals = $member->getMedalList(true);
    $memberMedalID = array_search($_POST['medal'], $arrMemberMedals);
    if ($revokeMedalObj->select($memberMedalID) && $revokeMedalObj->delete()) {
        // Check if medal is frozen for member already
        $arrFrozenMembers = $medalObj->getFrozenMembersList();
        if (in_array($_POST['member'], $arrFrozenMembers)) {
            $frozenMedalID = array_search($_POST['member'], $arrFrozenMembers);
            $medalObj->objFrozenMedal->select($frozenMedalID);
            $medalObj->objFrozenMedal->delete();
        }
        $frozenMessage = "";
        if ($medalObj->get_info("autodays") != 0 || $medalObj->get_info("autorecruits") != 0) {
            $freezeTime = 86400 * $_POST['freezetime'] + time();
            $medalObj->objFrozenMedal->addNew(array("medal_id", "member_id", "freezetime"), array($_POST['medal'], $_POST['member'], $freezeTime));
            $dispDays = $_POST['freezetime'] == 1 ? "day" : "days";
            $frozenMessage = "  The medal will not be awarded again for " . $_POST['freezetime'] . " " . $dispDays . ".";
        }
        $logMessage = $member->getMemberLink() . " was stripped of the " . $medalObj->get_info_filtered("name") . " medal." . $frozenMessage . "<br><br><b>Reason:</b><br>" . filterText($_POST['reason']);
        $member->postNotification("You were stripped of the medal: <b>" . $medalObj->get_info_filtered("name") . "</b>");
        $member->select($memberInfo['member_id']);
        $member->logAction($logMessage);
    } else {
        $formObj->blnSaveResult = false;
        $formObj->errors[] = "Unable to save information to the database.  Please contact the website administrator.";
    }
}
コード例 #3
0
 public function displayCustomPageLink()
 {
     $customPageObj = new Basic($this->MySQL, "custompages", "custompage_id");
     $menuCustomPageInfo = $this->menuItemObj->objCustomPage->get_info();
     $customPageObj->select($menuCustomPageInfo['custompage_id']);
     $menuItemInfo = $customPageObj->get_info_filtered();
     $menuItemInfo['name'] = $menuItemInfo['pagename'];
     $menuCustomPageInfo['link'] = MAIN_ROOT . "custompage.php?pID=" . $menuItemInfo['custompage_id'];
     $this->formatLink($menuItemInfo, $menuCustomPageInfo);
 }
コード例 #4
0
 function __construct()
 {
     $this->table = new fpp_client_Model();
     $this->id_client = (int) @$_SESSION['conf']['client']['id'];
     self::$id_cliente = $this->id_client;
     parent::__construct();
 }
コード例 #5
0
ファイル: Basic.class.php プロジェクト: shlomohass/IID
 function __construct($conf)
 {
     Trace::add_trace('construct class', __METHOD__);
     self::$conf = $conf;
     self::$conn = new DB($conf);
     $this->Func = new Func();
 }
コード例 #6
0
ファイル: basic.php プロジェクト: BackupTheBerlios/dnsmgr-svn
    /**
     * Abort with a fatal error, displaying debug information to the
     * user.
     *
     * @access public
     *
     * @param integer $error  		Error number which is assigned to a text in errors.php.
     * @param integer $file             The file in which the error occured.
     * @param integer $line             The line on which the error occured.
     * @param optional boolean $log     Log this message via Horde::logMesage()?
     */
    function fatalError($error, $file, $line, $log = true)
    {
        $errortext = _("<b>A fatal error has occurred:</b>") . "<br /><br />\n";
        $errortext .= Basic::getErrorMessage($error) . "<br /><br />\n";
        $errortext .= sprintf(_("[line %s of %s]"), $line, $file);
        /*if ($log) {
              $errortext .= "<br /><br />\n";
              $errortext .= _("Details have been logged for the administrator.");
          }*/
        // Hardcode a small stylesheet so that this doesn't depend on
        // anything else.
        echo <<<HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>Application Framework :: Fatal Error</title>
<style type="text/css">
<!--
body { font-family: Geneva,Arial,Helvetica,sans-serif; font-size: 12px; background-color: #013069; color: #ffffff; }
.header { color: #000000; background-color: #ffffff; font-family: Verdana,Helvetica,sans-serif; font-size: 12px; }
-->
</style>
</head>
<body>
<table border="0" align="center" width="500" cellpadding="2" cellspacing="0">
<tr><td class="header" align="center">{$errortext}</td></tr>
</table>
</body>
</html>
HTML;
        exit;
    }
コード例 #7
0
ファイル: Add.php プロジェクト: mpf-soft/admin-widgets
 public function init($config)
 {
     parent::init($config);
     if ($this->url == self::DEFAULT_URL) {
         eval("\$this->url = {$this->url};");
     }
 }
コード例 #8
0
 /** Constructor
  * 
  * @param array $conf
  */
 public function __construct($conf)
 {
     parent::__construct($conf);
     Trace::add_trace('construct class', __METHOD__);
     $this->author = isset(self::$conf['general']['author']) ? self::$conf['general']['author'] : '';
     $this->version = isset(self::$conf['general']['app_version']) ? self::$conf['general']['app_version'] : '';
 }
コード例 #9
0
ファイル: Delete.php プロジェクト: mpf-soft/admin-widgets
 public function init($config)
 {
     if (!$this->confirmation) {
         $this->confirmation = $this->translate('Are you sure you want to delete this?');
     }
     parent::init($config);
 }
コード例 #10
0
ファイル: theme.php プロジェクト: npfriday/Tinyboard
 public static function build($action, $settings)
 {
     global $config;
     if ($action == 'all' || $action == 'news') {
         file_write($config['dir']['home'] . $settings['file'], Basic::homepage($settings));
     }
 }
コード例 #11
0
 public function __construct($conf)
 {
     parent::__construct($conf);
     Trace::add_trace('construct class', __METHOD__);
     $this->user_ip = $this->get_ip_address();
     $this->is_loged();
 }
コード例 #12
0
ファイル: Helper.php プロジェクト: pythias/mock
 private static function _arrayPick($pool, $len, $glue)
 {
     $pool = self::json($pool);
     if (is_string($pool)) {
         $tmp = explode('|', $pool);
         if (count($tmp) > 1) {
             $pool = $tmp;
         }
     }
     $size = is_array($pool) ? count($pool) : mb_strlen($pool);
     $indexes = array();
     while (1) {
         $index = Basic::natural(0, $size - 1);
         $indexes[$index] = $index;
         if (count($indexes) == $len) {
             break;
         }
     }
     $values = array();
     foreach ($indexes as $index) {
         $values[] = is_array($pool) ? $pool[$index] : mb_substr($pool, $index, 1);
     }
     if ($glue == null) {
         return $values;
     }
     return implode($glue, $values);
 }
コード例 #13
0
ファイル: Basic.php プロジェクト: superve/MeteorCat
 private static function Config()
 {
     //Judge\Create Hook Folder
     $Conf = (include_once './CORE/Config.php');
     $GLOBALS['CONF'] = $Conf;
     self::$conf = $Conf;
 }
コード例 #14
0
ファイル: Sale.php プロジェクト: jglaine/sugar761-ent
 public function fill_in_additional_detail_fields()
 {
     parent::fill_in_additional_detail_fields();
     if (empty($this->amount_usdollar) && !empty($this->amount)) {
         $this->amount_usdollar = SugarCurrency::convertWithRate($this->amount, $this->base_rate);
     }
 }
コード例 #15
0
 function get_list_view_data()
 {
     $data = parent::get_list_view_data();
     $delete = '';
     $group_owner = false;
     $securitygroup_name = "";
     if (empty($data['SECURITYGROUP_ID'])) {
         $securitygroup_name = "All";
     } else {
         require_once 'modules/SecurityGroups/SecurityGroup.php';
         $securitygroup = new SecurityGroup();
         $securitygroup->retrieve($data['SECURITYGROUP_ID']);
         $securitygroup_name = $securitygroup->name;
         if ($securitygroup->assigned_user_id == $GLOBALS['current_user']->id) {
             $group_owner = true;
         }
     }
     if (is_admin($GLOBALS['current_user']) || $data['CREATED_BY'] == $GLOBALS['current_user']->id || $group_owner) {
         $delete = SugarThemeRegistry::current()->getImage('delete_inline', 'width="12" height="12" border="0" align="absmiddle" style="vertical-align: bottom;" onclick=\'Message.deleteMessage("' . $data['ID'] . '", "{this.id}")\'', null, null, '.gif', '');
     }
     $username = "";
     if (empty($data['CREATED_BY'])) {
         $username = "******";
     } else {
         require_once 'modules/Users/User.php';
         $user = new User();
         $user->retrieve($data['CREATED_BY']);
         $username = $user->user_name;
     }
     $data['NAME'] = $data['DESCRIPTION'];
     $data['NAME'] = '<div class="list view" style="padding:5px;border:none;">' . html_entity_decode($data['NAME']);
     $data['NAME'] .= '<div class="byLineBox" style="padding-top: 2px"><span class="byLineLeft">' . $username . ' [' . $securitygroup_name . ']';
     $data['NAME'] .= '&nbsp;</span><span style="cursor: pointer;" class="byLineRight"> ' . $this->getTimeLapse($data['DATE_ENTERED']) . ' &nbsp;' . $delete . '</span></div>';
     return $data;
 }
コード例 #16
0
ファイル: Enum.php プロジェクト: mpf-soft/admin-widgets
 /**
  * @param array|\string[] $config
  */
 public function init($config)
 {
     $options = $this->dataProvider->getColumnOptions($this->column ? $this->column : $this->name, $this->table);
     foreach ($options as $name) {
         $this->filter[$name] = $name;
     }
     return parent::init($config);
 }
コード例 #17
0
ファイル: TslibCobj.php プロジェクト: clickstorm/cs_cdn
 /**
  * Returns a <img> tag with the image file defined by $file and processed according to the properties in the TypoScript array.
  * Mostly this function is a sub-function to the IMAGE function which renders the IMAGE cObject in TypoScript. This function is called by "$this->cImage($conf['file'],$conf);" from IMAGE().
  *
  * @param	string		File TypoScript resource
  * @param	array		TypoScript configuration properties
  * @return	string		<img> tag, (possibly wrapped in links and other HTML) if any image found.
  * @access private
  * @see IMAGE()
  */
 function cImage($file, $conf)
 {
     $original = parent::cImage($file, $conf);
     $url = Basic::getImgUrl($original);
     $cdn = Basic::getCDN();
     $original = str_replace($url, $cdn . $url, $original);
     return $original;
 }
コード例 #18
0
ファイル: Request_sugar.php プロジェクト: omusico/sugar_work
 function Request_sugar()
 {
     parent::Basic();
     $cont = new Contact();
     $cont->retrieve('f0552f45-5d45-b8cd-b32c-521730a146f2');
     /*$rabbit = new SugarRabbit();
       $rabbit->CreateContact($cont);*/
 }
コード例 #19
0
 /**
  * {@inheritDoc}
  *
  * The created_by field must be kept in sync with the user_id field in order for the $created filter to work. This
  * fix (for jira: MAR-1841; SI: 67320) should be replaced by a refactor of the UserSignatures module so that the
  * user_id field can be dropped in favor of created_by.
  *
  * @param bool $check_notify
  * @return String
  */
 public function save($check_notify = false)
 {
     if (empty($this->user_id)) {
         $this->user_id = $GLOBALS['current_user']->id;
     }
     if ($this->created_by !== $this->user_id) {
         $this->created_by = $this->user_id;
     }
     return parent::save($check_notify);
 }
コード例 #20
0
 function __construct($id = 1)
 {
     $fpp = new fpp_paybank_Model();
     $orm = $fpp->db2cls($id);
     $title_paybank = Basic::TransVar("title_paybank");
     var_dump($title_paybank);
     $description_paybank = Basic::TransVar("description_paybank");
     $this->title = $orm->{$title_paybank};
     $this->description = $orm->{$description_paybank};
 }
コード例 #21
0
ファイル: ModalHelper.php プロジェクト: cmnworks/Cakestrap
 /**
  * This method will merge the default modal helper
  * options and user-provided options.
  *
  * @param array $options
  * @return object $this
  */
 public function options($options = [])
 {
     parent::options($options);
     $this->_options['visibility'] = 'fade out';
     $this->_options['id'] = 'id_' . mt_rand(1, 12345);
     if ((int) $this->_options['show'] == 1) {
         $this->_options['visibility'] = 'fade in';
     }
     return $this;
 }
コード例 #22
0
 function ajax_getmoney()
 {
     $id = abs((int) $_GET['id']);
     if ($id > 0) {
         $model = new fpp_district_Model();
         $orm = $model->db2cls($id);
         Basic::currency($orm->sendprice_district);
         echo $orm->sendprice_district;
     }
 }
コード例 #23
0
ファイル: game.php プロジェクト: nsystem1/clanscripts
 function calcStat($gameStatID, $memberObj)
 {
     $calculatedValue = 0;
     $gameStatObj = new Basic($this->MySQL, "gamestats", "gamestats_id");
     if ($gameStatObj->select($gameStatID) && isset($memberObj)) {
         $gameStatInfo = $gameStatObj->get_info_filtered();
         $gameStat1Obj = new Basic($this->MySQL, "gamestats", "gamestats_id");
         $gameStat2Obj = new Basic($this->MySQL, "gamestats", "gamestats_id");
         if ($gameStatInfo['stattype'] == "calculate" && $gameStat1Obj->select($gameStatInfo['firststat_id']) && $gameStat2Obj->select($gameStatInfo['secondstat_id'])) {
             $gameStats1Info = $gameStat1Obj->get_info_filtered();
             $gameStats2Info = $gameStat2Obj->get_info_filtered();
             $gameStat1Type = $gameStats1Info['stattype'];
             $gameStat2Type = $gameStats2Info['stattype'];
             if ($gameStat1Type == "calculate") {
                 $gameStat1Value = $this->calcStat($gameStats1Info['gamestats_id'], $memberObj);
             } else {
                 $gameStat1Value = $memberObj->getGameStatValue($gameStats1Info['gamestats_id']);
             }
             if ($gameStat2Type == "calculate") {
                 $gameStat2Value = $this->calcStat($gameStats2Info['gamestats_id'], $memberObj);
             } else {
                 $gameStat2Value = $memberObj->getGameStatValue($gameStats2Info['gamestats_id']);
             }
             switch ($gameStatInfo['calcop']) {
                 case "div":
                     if ($gameStat2Value == 0) {
                         $gameStat2Value = 1;
                     }
                     $calculatedValue = round($gameStat1Value / $gameStat2Value, $gameStatInfo['decimalspots']);
                     break;
                 case "mul":
                     $calculatedValue = round($gameStat1Value * $gameStat2Value, $gameStatInfo['decimalspots']);
                     break;
                 case "sub":
                     $calculatedValue = round($gameStat1Value - $gameStat2Value, $gameStatInfo['decimalspots']);
                     break;
                 default:
                     $calculatedValue = round($gameStat1Value + $gameStat2Value, $gameStatInfo['decimalspots']);
             }
         }
     }
     return $calculatedValue;
 }
コード例 #24
0
ファイル: Define.php プロジェクト: pythias/mock
 public static function handle(&$template)
 {
     if (isset($template[KEY_MOCK_DEFINE]) == false || is_array($template[KEY_MOCK_DEFINE]) == false) {
         return;
     }
     foreach ($template[KEY_MOCK_DEFINE] as $key => $value) {
         \Mock\Random\Define::set($key, Basic::handle($value));
     }
     unset($template[KEY_MOCK_DEFINE]);
 }
コード例 #25
0
ファイル: chatroom.php プロジェクト: nsystem1/clanscripts
 public function select($intIDNum)
 {
     $returnVal = false;
     if (is_numeric($intIDNum) && parent::select($intIDNum)) {
         if ($this->objEvent->select($this->arrObjInfo['event_id'])) {
             $returnVal = true;
         }
     }
     return $returnVal;
 }
コード例 #26
0
 public function index()
 {
     //$profiler = new Profiler;
     if (isset($_GET['emailtest'])) {
         $this->emailtest();
         die;
     }
     if (isset($_GET['database'])) {
         $this->alterDatabase();
     }
     if (isset($_GET['cronjob'])) {
         $this->cronjob();
         die;
     }
     @session_start();
     //     $lan = (@$_GET['l']<>'en') ? "es" : 'en';
     if (@$_GET['l'] != '') {
         $_SESSION['lan'] = @$_GET['l'] != 'en' ? array("es_ES", 'España') : array("en_US", 'USA');
     }
     if (@$_SESSION['lan'] != "") {
         Kohana::config_set("locale.language", $_SESSION['lan']);
     }
     $lang = new Translate();
     $lang->currency();
     $defaultobj = "category";
     $defaultact = "index";
     $module = $this->uri->segment("index") != '' ? $this->uri->segment("index") : $defaultobj;
     $action = $this->uri->segment($module) != '' ? $this->uri->segment($module) : $defaultact;
     $module = ucfirst($lang->word->{$module});
     $lib = new $module();
     $action = @$lang->word->{$action};
     $this->template->widget = $lib->GetWidgets();
     if (method_exists($lib, $action) === FALSE) {
         $lib = new $module();
         $lib->{$defaultact}();
     } else {
         $lib->{$action}();
     }
     $table_page = new fpp_page_Model();
     $header = $table_page->db2cls(46);
     $footer = $table_page->db2cls(47);
     $meta_description = $table_page->db2cls(48);
     $tr_content_page = Basic::TransVar("content_page");
     $this->template->header = strip_tags($header->{$tr_content_page});
     $this->template->footer = $footer->{$tr_content_page};
     $this->template->meta_description = strip_tags($meta_description->{$tr_content_page});
     //Executes Action's
     $this->template->title = $this->uri->segment() == '' ? 'floreria Rosabel | florerias peru | floreria | enviar flores peru' : Kohana::config("core.title_page") . $lib->GetTitle();
     $this->template->content = $lib->GetContent();
     $this->template->keywords = $lib->GetKeywords() != '' ? $lib->GetKeywords() : 'enviar flores peru, florerías en lima, florerias en lima, envio de flores a peru,florerías,florerias lima, florerias en Lima,floreria lima, Florerias de Lima, Flores domicilio Lima, Florerias en San Isidro, envio de flores a lima, envio de flores en peru,floreria amor y amistad,flores dia de las madres,arreglos florales, floreria san borja peru, florerias en trujillo, florerias en arequipa, floreria los olivos, florerias unidas,envio de flores lima, delivery flores lima, envio flores, floreria san isidro, arreglos flores, rosas, orquideas, giraloes, tulipanes, delivery flowers, send flowers lima, roses, flower shop lima';
     if (request::is_ajax()) {
         $this->auto_render = FALSE;
         echo $lib->GetContent();
     }
 }
コード例 #27
0
ファイル: acl_fields.php プロジェクト: omusico/sugar_work
 function acl_fields()
 {
     global $app_list_strings, $db, $moduleList;
     $app_list_strings['roles_list'] = array();
     $query = "SELECT id, name FROM acl_roles WHERE deleted=0 ORDER BY name";
     $res = $db->query($query);
     while ($row = $db->fetchByAssoc($res)) {
         $app_list_strings['roles_list'][$row['id']] = $row['name'];
     }
     parent::Basic();
 }
コード例 #28
0
 function save($notification = false)
 {
     $focus = new Reports_Merge_Utils();
     $focus->uploadTemplate($this);
     $info = pathinfo($this->filename);
     $this->extension_template = $info['extension'];
     if (empty($this->report_filename)) {
         $this->report_filename = $info['filename'] . ' ' . $this->date_format_for_name;
     }
     parent::save($notification);
 }
コード例 #29
0
ファイル: Date.php プロジェクト: pythias/mock
 private static function _randomTime($min = false, $max = false)
 {
     // min, max
     if ($min == false) {
         $min = 0;
     }
     if ($max == false) {
         $max = time();
     }
     return Basic::natural($min, $max);
 }
コード例 #30
0
 public function saveAuth($username, $password, $remember = false)
 {
     $this->clearAuth();
     $this->username = $this->_sessionModule->username = $username;
     $this->password = $this->_sessionModule->password = $password;
     if ($remember) {
         $this->_cookieModule->set(md5('username' . $this->salt), $username, time() + 2592000);
         $password = Basic::authcode($password, 'ENCODE', $this->salt);
         $this->_cookieModule->set(md5('password' . $this->salt), $password, time() + 2592000);
     }
 }