public function postAccprq(Request $req) { if ($req->ajax()) { data_prq::find($req->id)->update(['id_acc' => \me::data()->id_karyawan]); return json_encode(['return' => true]); } }
/** * 默认值 */ private function orders_default_value() { //状态 self::$status = array('null' => '下订单 -> 审核', 'audit' => '通过审核', 'earnest' => '通过审核 -> 付定金', 'deploy' => '付定金 -> 调货', 'balance' => '调货 -> 付余款', 'dispatch' => '付余款 -> 发货', 'receiving' => '收到货物', 'returned' => '取消的订单'); $this->sma->assign('status', self::$status); //形状 self::$shape = array('round' => '圆形', 'princess' => '公主方', 'heart' => '心形', 'pear' => '梨形', 'emerald' => '祖母绿', 'marquise' => '马眼形', 'cushion' => '垫形', 'oval' => '椭圆形', 'radiant' => '明亮形'); $this->sma->assign('shape', self::$shape); //产品来源 self::$proSource = array('speculation' => '炒货', 'self' => '自家店铺', 'comate' => '代理商'); $this->sma->assign('proSource', self::$proSource); //国家 self::$country = array('China' => '中国', 'India' => '印度', 'Hongkong' => '香港', 'Belgium' => '比利时', 'USA' => '美国'); $this->sma->assign('country', self::$country); //库存地点 self::$stockAddress = $this->db->select_to_2Array("select address from stock_address order by taxis desc"); $this->sma->assign('stockAddress', self::$stockAddress); }
$this->whatnow = $g; } function printall() { echo "<h2 style='padding:0;margin:0 0 10px 0;'>What do you want to know?</h2>"; echo "My full name is " . $this->FullName . "<br>"; echo "My birthday is on " . $this->Birthday . "<br>"; echo "My favorite song is " . $this->FavoriteSong . "<br>"; echo "My personal favorite extra-curricular is " . $this->BestExtraCurricular . "<br>"; echo "I am in the class of " . $this->GraduationYear . "<br>"; echo "My favorite class is " . $this->favoriteClass . "<br><br>"; } function __destruct() { echo $this->whatnow . " has been changed to another song<br><br>"; } function __toString() { return "This is the class object, not some text to be just printed, so it IS important<br><br>"; } } $reminder = new me("Jonathan Richard Zimmer", "March 14", "Fireflies by Owl City", "First Tech Challenge", 2018, "my computer class", "My favorite song"); $reminder->test(); $reminder->printall(); echo $reminder; $reminder = "plant"; ?> </div> </center>
echo self::$c, "\n"; echo " this is static"; } function test1() { $str = $this->str; $a = substr_replace($str, "uuuu", 2, 3); $b = str_replace("ell", 'wwww', $str); return array($a, $b); } function __destruct() { } } class iclass { } //echo me::$c; //me::t(); $a = new me('hello world'); $b = $a->test(); //var_dump($b); //$af=strrev("meihao"); //var_dump($af); $d = $a->test1(); //var_dump($d); $email = "meihao@@126.com"; $url = "http://www.baidu.com"; $r = filter_var($email, FILTER_VALIDATE_EMAIL); $rr = filter_var($url, FILTER_VALIDATE_URL); var_dump($r, $rr);