public static function convert($c) { $c = trim($c); if ('' == $c) { return ''; } $no = Str::rand(4); $arr = explode("\n", $c); $str = '<table class="magnet table table-striped" style="font-size:12px;"><thead><tr><th>SimCD 磁力下载 <span class="pull-right">建议使用迅雷离线下载、QQ旋风极速下载</span></th><td></td></tr></thead><tbody>'; foreach ($arr as $magnet) { $magnet = str_replace('(ED2000.COM)', '', $magnet); $magnet = self::normalization($magnet); $name = self::name($magnet); if ('' == $name) { $name = $magnet; } $str .= '<tr><td style="word-break:break-all;"><input type="checkbox" class="chk" name="chk' . $no . '[]" value="' . $magnet . '" onclick="thunder.check(\'' . $no . '\');" checked="checked" /> <a rel="nofollow" href="' . $magnet . '">' . $name . '</a></td></tr>'; } $str .= '<tr><td><label for="chkall' . $no . '"><input type="checkbox" class="chkall" id="chkall' . $no . '" onclick="thunder.checkAll(\'' . $no . '\',this.checked,event)" checked="checked" /> 全选' . '</label></td></tr><tr><td><input type="button" id="copylinks' . $no . '" class="btn btn-success copylinks" title="复制选中链接" value="复制选中链接" /> <span id="copied' . $no . '" style="display:none;" class="text-success">√ 已复制</span> </td></tr>'; $str .= '</body></table>'; return $str; }
public static function hash_password($password) { $salt = Str::rand(); return $password = sha1($salt . $password) . ':' . $salt; }
protected function _restart() { $this->regenerate(); $return = $this->_start(Str::rand()); $this->_sync(); $this->_data =& $_SESSION; return $return; }
function setELE() { $this->var = "uploader_" . Str::rand(4); $this->uploadBtn = "uploader_btn_" . Str::rand(4); }