Jump to content

xaero

User
  • Posts

    98
  • Joined

  • Last visited

Everything posted by xaero

  1. xaero

    Ext JS

    Ya rabotal ...
  2. xaero

    Elib

    http://elib.awardspace.com otsenite poyaluysta...
  3. xaero

    Massivi

    Mojno v PHP mnogomernie massivi na odinarnie...delat?
  4. xaero

    slashes

    <?php // connect mysql @mysql_connect('localhost', 'root', '') or die('Connection failed'); // select database @mysql_select_db('cms') or die('Unable select database'); // submit if(isset($_POST['submit'])) { if(function_exists('mysql_real_escape_string')) { $title = mysql_real_escape_string($_POST['title']); } } ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>TEST</title> </head> <body> <form method="POST"> <input type="hidden" name="submit" value="1"> <input type="text" name="title" value="<?=stripslashes($title)?>"> <input type="submit" value="submit"> </form> </body> </html> Sleshi ne udalyaetsya:
  5. <? $links[0] = '<a href="http://yandex.ru">Yander</a>'; $links[1] = '<a href="http://www.greenman.ru">Ggreenman</a>'; $links[2] = '<a href="http://www.rambler.ru/">rambler</a>'; if(isset($_GET['id']) && is_numeric($_GET['id']) && isset($links[$_GET['id']])){ print $links[$_GET['id']]; } // esli konechno nado else{ print "URL NOT EXISTS"; } ?>
  6. Кто хочет стать миллионером в этом игре как можно добавить свои вопросы?
  7. // JavaScript function UpldFile(f){ $.get('file.php', {file:f}, function(data){ alert('Data send'); }); } if(!empty($_GET['file'])){ // file properties $filename = 'upload/'.$_GET['file']; $fileextn = end(explode('.', $_GET['file'])); // force-download switch($fileextn) { case "pdf": $ctype="application/pdf"; break; case "exe": $ctype="application/octet-stream"; break; case "zip": $ctype="application/zip"; break; case "doc": $ctype="application/msword"; break; case "xls": $ctype="application/vnd.ms-excel"; break; case "ppt": $ctype="application/vnd.ms-powerpoint"; break; case "gif": $ctype="image/gif"; break; case "png": $ctype="image/png"; break; case "jpeg": case "jpg": $ctype="image/jpg"; break; default: $ctype="application/force-download"; } header("Pragma: public"); header("Expires: 0"); header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); header("Cache-Control: private",false); header("Content-Type: $ctype"); header("Content-Disposition: attachment; filename="".basename($filename)."";" ); header("Content-Transfer-Encoding: binary"); header("Content-Length: ".filesize($filename)); readfile("$filename"); exit(); } fayl ne skachivaetsya... ?
  8. Sotnikov Bu sayt juda yaqshi, itning didi bor - ты знаеш что это значить? цензура
  9. Otsenite pls ... http://jizpi.uz/new/
  10. xaero

    TinyMCE

    Ya obichno ispolzuyu TinyMCE no dosixpor ne znayu kak pravilno ustanovit: eto vopsheto pravilno? <!--// tinyMCE.init({ mode : "textareas", theme : "advanced", plugins : "safari,spellchecker,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,pagebreak", theme_advanced_buttons1_add : "fontselect,fontsizeselect", theme_advanced_buttons2_add : "separator,insertdate,inserttime,preview,separator,forecolor,backcolor", theme_advanced_buttons2_add_before: "cut,copy,paste,pastetext,pasteword,separator,search,replace,separator", theme_advanced_buttons3_add_before : "tablecontrols,separator", theme_advanced_buttons3_add : "emotions,iespell,media,advhr,separator,print,separator,ltr,rtl,separator,fullscreen", theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,spellchecker,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,blockquote,pagebreak,|,insertfile,insertimage", theme_advanced_toolbar_location : "top", theme_advanced_toolbar_align : "left", theme_advanced_statusbar_location : "bottom", content_css : "../js/tiny_conf.css", plugin_insertdate_dateFormat : "%Y-%m-%d", plugin_insertdate_timeFormat : "%H:%M:%S", external_link_list_url : "example_data/example_link_list.js", external_image_list_url : "example_data/example_image_list.js", flash_external_list_url : "example_data/example_flash_list.js", template_external_list_url : "example_data/example_template_list.js", apply_source_formatting : true, spellchecker_languages : "+English=en,Danish=da,Dutch=nl,Finnish=fi,French=fr,German=de,Italian=it,Polish=pl,Portuguese=pt,Spanish=es,Swedish=sv" }); //-->
  11. xaero

    DbSimple

    Kto nibut rabotal s DbSimplom (istochnik http://dklab.ru/lib/DbSimple/) va bazu dobavlyayu tak: $row = array('message'=>&$message, 'parent'=>&$prnt); $sql->query('INSERT INTO ?_message(?#) VALUES(?a)', array_keys($row), array_values($row)); vapros takoy: $message tam avtomatom dobavlyaetsya mysql_real_escape_string ?
  12. http://verens.com/archives/2007/07/08/splitter-for-mootools/ kak mojno izmenit razmeri elementov v mootools/splitter
  13. xaero

    Force-Download

    Privet vsem !!! U menya takaya problema: function download($file_name){ header('Pragma: public'); header('Expires: 0'); header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); header('Cache-Control: private',false); header('Content-Type: application/force-download'); header('Content-Disposition: attachment; filename="'.basename($file_name).'"'); header('Content-Transfer-Encoding: binary'); header('Content-Length: '.filesize($file_name)); // provide file size readfile($file_name); // push it out exit; } if(isset($_GET['f'])){ download("download/{$_GET['f']}"); //print urldecode($_GET['f']); } esli ya poprobuyu download s takim imenam: download.php?f=log ' ins.doc on na disk soxronyaet tolko (' ins.doc) i vnutri dannie ischezaet... pomogite pojaluysta kak eto delat chto bi fayl soxranilsa s polniy imenam i tak dannie ne poteryali...
  14. xaero

    Katalog Faylov

    http://woweb.ru/load/99-1-0-4130 etot katalog mojno skachivat? Esli da? Kak eto nado delat? Zaranee spasibo...
  15. xaero

    User permissions

    Spasibo bolshoe
  16. xaero

    User permissions

    Kak nado delat user permissions v saytax. Dopustim takie polzovateli: admin, modertator, user, i guest pomogite kak eto delat, kakie nibud primeri? Zaranee spasibo...
  17. xaero

    MTMenu

    http://treemenu.org Rebyata pomogite nayti tipa takuyu tree menu !!! Eto menu ne podxodit potomushto u nega avto scroll i ne podderjivaet v Opere 8.0 po etomu
  18. Vlad попробуйте ещ? раз открыть!!!
  19. Здравствуйте дорогие программисти! У меня такая проблема? есть 40 000 слов и его английский перевод. В JavaScript сразу 40 000 строк слов отображать неполучается? На пример: for(i=0; i<40000; i++) { Document.write(i); } А как думайте есть другой вариант чтоб эти 40 000 слов отображались сразу и не какой зависание броузера?.
  20. xaero

    HTML code highlighter

    Poproboval napisat HTML code highlighter <?php $html_tags = array( 'image'=>array( 'tags'=>array('img', 'area', 'map'), 'conf'=>array('tag'=>'#9932cc', 'attrb'=>'#9932cc', 'value'=>'#0000ff', 'quote'=>'#9932cc', 'equal'=>'#9932cc') ), 'standart'=>array( 'tags'=>array('i', 'b', 'em', 'tt', 'font', 'abbr', 'acronym', 'bdo', 'big', 'cite', 'code', 'del', 'dfn', 'ins', 'kbd', 'samp', 'small', 'span', 'strong', 'sub', 'sup', 'tt', 'var'), 'conf'=>array('tag'=>'#0000ff', 'attrb'=>'#0000ff', 'value'=>'#0000ff', 'quote'=>'#0000ff', 'equal'=>'#0000ff') ), 'default'=>array( 'tags'=>array('address', 'base', 'bgsound', 'blockquote', 'body', 'br', 'dd', 'embed', 'div', 'dl', 'h1', 'h2', 'h3', 'h4', 'h5', 'head', 'hr', 'html', 'li', 'link', 'marquee', 'meta', 'nobr', 'ol', 'p', 'pre', 'title', 'ul'), 'conf'=>array('tag'=>'#191970', 'attrb'=>'#191970', 'value'=>'#0000ff', 'quote'=>'#191970', 'equal'=>'#191970') ), 'table'=>array( 'tags'=>array('table', 'tr', 'td', 'thead', 'tfoot', 'tbody', 'caption'), 'conf'=>array('tag'=>'#008000', 'attrb'=>'#008000', 'value'=>'#008000', 'quote'=>'#008000', 'equal'=>'#008000') ), 'form'=>array( 'tags'=>array('button', 'fieldset', 'form', 'input', 'label', 'legend', 'optgroup', 'option', 'select', 'textarea'), 'conf'=>array('tag'=>'#ffa500', 'attrb'=>'#ffa500', 'value'=>'#ffa500', 'quote'=>'#ffa500', 'equal'=>'#ffa500') ), 'frame'=>array( 'tags'=>array('frame', 'frameset', 'iframe'), 'conf'=>array('tag'=>'#6495ed', 'attrb'=>'#6495ed', 'value'=>'#6495ed', 'quote'=>'#6495ed', 'equal'=>'#6495ed') ), 'object'=>array( 'tags'=>array('param', 'object'), 'conf'=>array('tag'=>'#cd853f', 'attrb'=>'#cd853f', 'value'=>'#cd853f', 'quote'=>'#cd853f', 'equal'=>'#cd853f') ) ); function HTML_Code($text) { function tagMatch($v) { global $html_tags; $ltgSign = $v[1]; $clsSign = $v[2]; $tagName = $v[3]; $spcSign = $v[4]; $allAttr = $v[5]; $lgtSign = $v[6]; $color = ''; foreach($html_tags as $k=>$v){ if(in_array(strtolower(trim($tagName)), $v['tags'])) { $conf = $v['conf']; $color = $conf['tag']; $allAttr = preg_replace("/([a-z]+)(=)("|')?([^"']+)("|')?/i", "<font color='{$conf['attrb']}'>$1</font>". "<font color='{$conf['equal']}'>$2</font>". "<font color='{$conf['quote']}'>$3</font>". "<font color='{$conf['value']}'>$4</font>". "<font color='{$conf['quote']}'>$5</font>", $allAttr); } } $line = "<span class='tag' style='color:{$color}'>"; $line.= $ltgSign.$clsSign.$tagName.$spcSign.$allAttr.$lgtSign; $line.= "</span>"; return $line; } $code = str_replace('<', '<', $text); $code = str_replace('>', '>', $code); $code = preg_replace_callback("/(<)(/)?([a-z0-9]+)( )?(.*?)(>)/is", "tagMatch" , $code); $html = '<pre>'; $html.= $code; $html.= '</pre>'; return $html; } ?> <html> <head> <title> HTML CODE HIGHLIGHTER</title> </head> <style> span.tag { font-family: Courier New; font-size: 12px; } </style> <body> <?php $code = <<<EOF <html> <head> <title> I think i can do it...</title> </head> <body> <div align="center"><img src="images/co/lt"></div> <form method="POST" enctype="mutipart/form-encoded"> <input type="hidden" name="post_id" value="insert"> Username: <input type="text" name="username"> </form> <b>I can do it</b> <table cellspacing="0" cellpadding="0" border="1"> <tr> <td>Column number</td> </tr> </table> <iframe src="nofile.html"></iframe> </body> </html> EOF; print HTML_Code($code); ?> </body> </html>
  21. xaero

    Tree view

    Na primer u menya est takoy massiv: var tree = ['Home', 'Products', 'JavaScript', ['Functions', 'Objects', 'Classes', ['DYNAPI', 'MyFrame', 'X-Objects' ], 'Variables' ], 'Current', 'Machines' ] Ya xotel bi ego otobrajat kak tree view pomogite napisat funksiyu... Ya sam poproboval no eto ogronicheno, function TM(a) { for(i=0; i { if(typeof a=='object') { for(ii=0; ii { if(typeof a[ii]=='object') { for(iii=0; iii
  22. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>Untitled</title> </head> <script> function ShowDiv(id,n) { var div_object; var div_rand; div_rand = Math.ceil(Math.random()*n); if(document.getElementById(id)){ div_object = document.getElementById(id); div_object.style.background = "url('im/"+div_rand+".gif')"; } } </script> <body> <div id="m" style="border: 1px solid silver; padding: 5px;">asdfasdf</div> <script> ShowDiv('m',3); </script> </body> </html>
  23. function setSpanClick(){ getConstructor = new obj(); alert(getConstructor.array); //как же получить значение this.array[i] //как же получить значение свойств/методов obj() }
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. See more about our Guidelines and Privacy Policy