Jump to content

mart94

Members
  • Posts

    23
  • Joined

  • Last visited

    Never

Everything posted by mart94

  1. Hi! I've developed HTML5 video player with my own controls. On the right side I have playlist, if I click on <li> element, then new video will be loaded and it starts playing. Everything works fine in Firefox, Chrome, Opera, IE 9 but there is problem in Safari. Well, If I click on <li> element, then new video won't be loaded. Code is located at http://martleib.com/projektid/elion_html5_videoplayer/ (You can view Source Code) I quess, the problem is somewhere in "js/player.js" in $('.video_sidebar .overview li').click(function() { var mp4link = $(this).attr('mp4link'); var webmlink = $(this).attr('webmlink'); $("#html5-video-tag video")[0].pause(); $("#html5-video-tag video #mp4").attr("src", mp4link); $("#html5-video-tag video #webm").attr("src", webmlink); $("#html5-video-tag video")[0].load(); $("#html5-video-tag video")[0].play(); $(".video_sidebar .overview li").css("background", "none"); $(this).css("background-color", "#fff"); }); But when you visit link http://martleib.com/projektid/elion_html5_videoplayer/?id=1 (it simulates click on first <li> element in playlist) then video will be loaded and starts. All the best Mart L.
  2. Hi! What i can't figure out, is how to delete between 2 given strings in another file. Explanation: I have a file, it contains following: ### Start of content 0 ### Some Radom Lines with text 1 ### End of content 0 ### ### Start of content 1 ### Some Radom Lines with text 2 ### End of content 1 ### ### Start of content 2 ### Some Radom Lines with text 3 ### End of content 2 ### And so on, now i need code, which can find line i give and delete between. Something like this: If, i give string: ### Start of content 0 ### Then it will delete this line to the ### End of content 0 ### Hope you can help! All the best: Mart L.
  3. ls -al Gives me following: drwx------ 5 itt_214 itt_214 4096 Mar 15 17:10 myfiles
  4. You mean Chown www-data:www-data /home/myfiles ?
  5. Hi! Having problem with Alias. When i create just folder via FTP, it works, i can see it and browse files, but when I add Alias, there's problem, any folder / file has 403 Forbidden error. Apache2.conf # # Based upon the NCSA server configuration files originally by Rob McCool. # # This is the main Apache server configuration file. It contains the # configuration directives that give the server its instructions. # See http://httpd.apache.org/docs/2.2/ for detailed information about # the directives. # # Do NOT simply read the instructions in here without understanding # what they do. They're here only as hints or reminders. If you are unsure # consult the online docs. You have been warned. # # The configuration directives are grouped into three basic sections: # 1. Directives that control the operation of the Apache server process as a # whole (the 'global environment'). # 2. Directives that define the parameters of the 'main' or 'default' server, # which responds to requests that aren't handled by a virtual host. # These directives also provide default values for the settings # of all virtual hosts. # 3. Settings for virtual hosts, which allow Web requests to be sent to # different IP addresses or hostnames and have them handled by the # same Apache server process. # # Configuration and logfile names: If the filenames you specify for many # of the server's control files begin with "/" (or "drive:/" for Win32), the # server will use that explicit path. If the filenames do *not* begin # with "/", the value of ServerRoot is prepended -- so "foo.log" # with ServerRoot set to "/etc/apache2" will be interpreted by the # server as "/etc/apache2/foo.log". # ### Section 1: Global Environment # # The directives in this section affect the overall operation of Apache, # such as the number of concurrent requests it can handle or where it # can find its configuration files. # # # ServerRoot: The top of the directory tree under which the server's # configuration, error, and log files are kept. # # NOTE! If you intend to place this on an NFS (or otherwise network) # mounted filesystem then please read the LockFile documentation (available # at <URL:http://httpd.apache.org/docs/2.2/mod/mpm_common.html#lockfile>); # you will save yourself a lot of trouble. # # Do NOT add a slash at the end of the directory path. # #ServerRoot "/etc/apache2" # # The accept serialization lock file MUST BE STORED ON A LOCAL DISK. # LockFile ${APACHE_LOCK_DIR}/accept.lock # # PidFile: The file in which the server should record its process # identification number when it starts. # This needs to be set in /etc/apache2/envvars # PidFile ${APACHE_PID_FILE} # # Timeout: The number of seconds before receives and sends time out. # Timeout 300 # # KeepAlive: Whether or not to allow persistent connections (more than # one request per connection). Set to "Off" to deactivate. # KeepAlive On # # MaxKeepAliveRequests: The maximum number of requests to allow # during a persistent connection. Set to 0 to allow an unlimited amount. # We recommend you leave this number high, for maximum performance. # MaxKeepAliveRequests 100 # # KeepAliveTimeout: Number of seconds to wait for the next request from the # same client on the same connection. # KeepAliveTimeout 15 ## ## Server-Pool Size Regulation (MPM specific) ## # prefork MPM # StartServers: number of server processes to start # MinSpareServers: minimum number of server processes which are kept spare # MaxSpareServers: maximum number of server processes which are kept spare # MaxClients: maximum number of server processes allowed to start # MaxRequestsPerChild: maximum number of requests a server process serves <IfModule mpm_prefork_module> StartServers 5 MinSpareServers 5 MaxSpareServers 10 MaxClients 150 MaxRequestsPerChild 0 </IfModule> # worker MPM # StartServers: initial number of server processes to start # MaxClients: maximum number of simultaneous client connections # MinSpareThreads: minimum number of worker threads which are kept spare # MaxSpareThreads: maximum number of worker threads which are kept spare # ThreadLimit: ThreadsPerChild can be changed to this maximum value during a # graceful restart. ThreadLimit can only be changed by stopping # and starting Apache. # ThreadsPerChild: constant number of worker threads in each server process # MaxRequestsPerChild: maximum number of requests a server process serves <IfModule mpm_worker_module> StartServers 2 MinSpareThreads 25 MaxSpareThreads 75 ThreadLimit 64 ThreadsPerChild 25 MaxClients 150 MaxRequestsPerChild 0 </IfModule> # event MPM # StartServers: initial number of server processes to start # MaxClients: maximum number of simultaneous client connections # MinSpareThreads: minimum number of worker threads which are kept spare # MaxSpareThreads: maximum number of worker threads which are kept spare # ThreadsPerChild: constant number of worker threads in each server process # MaxRequestsPerChild: maximum number of requests a server process serves <IfModule mpm_event_module> StartServers 2 MaxClients 150 MinSpareThreads 25 MaxSpareThreads 75 ThreadLimit 64 ThreadsPerChild 25 MaxRequestsPerChild 0 </IfModule> # These need to be set in /etc/apache2/envvars User ${APACHE_RUN_USER} Group ${APACHE_RUN_GROUP} # # AccessFileName: The name of the file to look for in each directory # for additional configuration directives. See also the AllowOverride # directive. # AccessFileName .htaccess # # The following lines prevent .htaccess and .htpasswd files from being # viewed by Web clients. # <Files ~ "^\.ht"> Order allow,deny Deny from all Satisfy all </Files> # # DefaultType is the default MIME type the server will use for a document # if it cannot otherwise determine one, such as from filename extensions. # If your server contains mostly text or HTML documents, "text/plain" is # a good value. If most of your content is binary, such as applications # or images, you may want to use "application/octet-stream" instead to # keep browsers from trying to display binary files as though they are # text. # DefaultType text/plain # # HostnameLookups: Log the names of clients or just their IP addresses # e.g., www.apache.org (on) or 204.62.129.132 (off). # The default is off because it'd be overall better for the net if people # had to knowingly turn this feature on, since enabling it means that # each client request will result in AT LEAST one lookup request to the # nameserver. # HostnameLookups Off # ErrorLog: The location of the error log file. # If you do not specify an ErrorLog directive within a <VirtualHost> # container, error messages relating to that virtual host will be # logged here. If you *do* define an error logfile for a <VirtualHost> # container, that host's errors will be logged there and not here. # ErrorLog ${APACHE_LOG_DIR}/error.log # # LogLevel: Control the number of messages logged to the error_log. # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. # LogLevel warn # Include module configuration: Include mods-enabled/*.load Include mods-enabled/*.conf # Include all the user configurations: Include httpd.conf # Include ports listing Include ports.conf # # The following directives define some format nicknames for use with # a CustomLog directive (see below). # If you are behind a reverse proxy, you might want to change %h into %{X-Forwarded-For}i # LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined LogFormat "%h %l %u %t \"%r\" %>s %O" common LogFormat "%{Referer}i -> %U" referer LogFormat "%{User-agent}i" agent # Include of directories ignores editors' and dpkg's backup files, # see README.Debian for details. # Include generic snippets of statements Include conf.d/ # Include the virtual host configurations: Include sites-enabled/ httpd.conf Alias /myfiles "/home/myfiles" <Directory "/home/myfiles"> Options Indexes MultiViews FollowSymLinks AllowOverride None Order allow,deny Allow from all </Directory> Now, when I open browser and go: Http://Server_ip/myfiles It gives 403 Forbidden error. Same thing happens, when I try to download file like: Http://Server_ip/myfiles/file1.rar Running Debian 6 64BIT Hope someone can help! All The Best, Mart L.
  6. I need query, witch counts from 2 different table "row" values, and orders by count total. Example: I have a table named T1, and it includes: 1 1 2 2 3 3 4 4 5 5 and another table named T2: 1 1 2 2 3 3 4 4 5 5 Now, query counts both values: 1 2 2 4 4 6 5 10 Now it orders it Desc 5 10 4 6 2 4 1 2 Table content can be also: 1 2 1 3 1 4 2 4 5 6 And second: 1 4 1 2 2 5 4 1 5 2 Counting result: 1 15 2 9 4 1 5 8 Ordering: 1 15 2 9 5 8 4 1
  7. Hi! I created query: $query = mysql_query("SELECT row, COUNT(*) AS rowCount FROM table1 WHERE row2 = 'something' GROUP BY row ORDER BY rowCount DESC"); What it does, it querys from database, and gives me something like TOP style, i mean, it Orders by rowCount, and it is working well, but now, i need little bit help, I want to take that Count from talbe2 also. And then Order by total count. Hope you understand! All The Best, Mart
  8. Well, Thanks for trying to help, but i figured it out myself Did little bit research about arrays, and came up with this: $query0 = mysql_query("Select * From numbers Where active = '1'"); $numbers = array("10000", "10001", "10002", "10004", "10005", "10006"); $numbers_used = array(); while($query1_result = mysql_fetch_assoc($query0)){ $numbers_used[] = $query1_result['number']; } $usable_numbers = array_diff($numbers, $numbers_used); sort($usable_numbers); echo $usable_numbers[0]; //Testing purposes only, echos out first number in array
  9. Well, the numbers can overlap, i mean, under numbers can be 10000 like 2 or more times, script reads that "active" row also, and only numbers with active set "1" must be different (10000, 10001, 10002, 10003, 10004, 10005) Best regards: Mart
  10. Hi! I need a little bit coding help here. I have a table: Numbers, Active Under numbers can be 10000, 10001, 10002, 10003, 10004, 10005 and active can be 1 or 0, depends on is this row active or not. Now, i need to check, is there any numbers lost, i mean, (for example) in table i have numbers 10002, 10000 and 10005 Can somebody make script, what finds those lost numbers, in this case those are: 10001, 10003 and 10004. All the best: Mart
  11. Wrong forum, im sorry!
  12. Hi! I found from internet this code: var page = "#"; function ajax(url,target) { // native XMLHttpRequest object document.getElementById(target).innerHTML = '<img src="lgsl_files/other/loading.GIF" width="25" height="25"> Serveri Uuendamine'; if (window.XMLHttpRequest) { req = new XMLHttpRequest(); req.onreadystatechange = function() {ajaxDone(target);}; req.open("GET", url, true); req.send(null); // IE/Windows ActiveX version } else if (window.ActiveXObject) { req = new ActiveXObject("Microsoft.XMLHTTP"); if (req) { req.onreadystatechange = function() {ajaxDone(target);}; req.open("GET", url, true); req.send(); } } } function ajaxDone(target) { // only if req is "loaded" if (req.readyState == 4) { // only if "OK" if (req.status == 200 || req.status == 304) { results = req.responseText; document.getElementById(target).innerHTML = results; } else { document.getElementById(target).innerHTML="ajax error:\n" + req.statusText; } } } It refreshes content, if i click button or image, what have onclick="ajax(page, 'scriptoutput')" And refreses content of table what have id="scriptoutput" But, the table moves down, if i press onclick="ajax(page, 'scriptoutput')" button, and stays there, it refreshes well, but i want to table be in one place. Hope you understand, if not, see attached picture. [attachment deleted by admin]
  13. Hi, can anybody give me an example for this: I have html code: Value 1:<select name='value1'> <option value='1'>1</option> <option value='2'>2</option> <option value='3'>3</option></select> Now i need to do this: If i select option 1 then will appear another <select> and there will be other options. All The Best: Mart
  14. Hi, thanks for reply but i have still problems. My code: $c = mysql_query("SELECT country, COUNT(*) AS countryCount FROM TOP GROUP BY Country ORDER BY countryCount DESC LIMIT 5"); while($topc = mysql_fetch_assoc($c)){ $topcountry = $topc['country']; echo $topcountry; } Result is coming out messed up, what im doing wrong? All The Best: Mart
  15. Hi, Im working on Top5 system, right. So i need help with this part: How to i get top results like, i have in table Country, and i need to get TOP5 of them, i mean like what Country are there most. Example: Country Estonia Estonia Estonia Russia England England Then TOP will be so: #1 Estonia #2 England #3 Russia Hope you all understand and help me All The Best: Mart
  16. Hi, does someone knows good script to convert *video* to .flv like youtube. Is there any scripts downloadable? All the best: Mart.
  17. Doesn't work, maybe it's mine mistake but now renamed php script "picture.png" will start download, and can't be dispalyed...
  18. Hi, i searched form internet "Image creating" script, i found one and this is working great, but is it possible to give this file name like picture.png to use it forum avatar. PHP Code: <?php $my_img = imagecreate( 130, 130 ); $background = imagecolorallocate( $my_img, 255, 255, 255 ); $font = 'Bedizen.ttf'; $text = "Kell On:"; $size = 11; $text_color = imagecolorallocate( $my_img, 0, 0, 255 ); $text_color2 = imagecolorallocate( $my_img, 255, 0, 0 ); $date = date("G:i:s"); imagesetthickness ( $my_img, 5 ); imagettftext($my_img, $size, 4, 40, 50, $text_color, $font, $text); imagettftext($my_img, $size, 4, 35, 65, $text_color2, $font, $date); header( "Content-type: image/png" ); imagepng( $my_img ); imagecolordeallocate( $text_color ); imagecolordeallocate( $background ); imagedestroy( $my_img ); ?> www.xcsx.eu/test2.php All the best: Mart
  19. Hi, i have a problem with searching from string. Something like this: $value = "abcdefghijkl"; $newvalue = "afkx"; And i need help to search each chr $newvalue from $value. After checking it would add letters from $newvalue to $value . But it wont duplicate letters, i mean: If found letter then it wont add, if letter isn't found add it. Not like this: $value = "aabcdeffhijkklx"; Like this: $value = "abcdefghijklx"; All The Best: Mart
  20. Dude you are a awsome! This is working. Thank you !
  21. Hi. This code is almost working but i dont get anything that site where i want to put this. Picture of output: http://www.upload.ee/image/233930/clipboard_upped.png There is exactly rows as much in database. Mart
  22. I tested any way but the output will be same... Only way to change order is in first result: $result = mysql_query("SELECT admin_id FROM amx_admins_servers WHERE server_id=1 ORDER BY admin_id ASC") or die(mysql_error()); If i write this so: $result = mysql_query("SELECT admin_id FROM amx_admins_servers WHERE server_id=1 ORDER BY admin_id DESC") or die(mysql_error()); Then the list will be inverted. Mart
  23. Hi. I have a problem with while() loop. Code: <head> <style type="text/css"> .style2 { color: #00C000; font-weight: bold; } </style> </head> <body style="background-color: #202020"> <table cellspacing='1' class='listtable' width='100%'> <tr bgcolor="#000000"> <td height='16' width='5%' style="padding-left: 7px" align='center' class="style2">ID</td> <td height='16' width='40%' style="padding-left: 7px" align='center' class="style2">Nimi</td> <td height='16' width='35%' class='style2' style="padding-left: 7px" align='center'>Õigused</td> <td height='16' width='20%'class='style2' style="padding-left: 7px" align='center'>Lõpukuupäev</td> </tr> </table> <?php // Õiguste muutmine include("adminilist.php"); // Muu pask ka siin $serverivalik = $_POST['serverivalik']; function destroy_foo() { global $variables; unset($variables); } // Connect mysql_connect('localhost', 'root', '') or die("dont connect to server"); // Valib andmebaasi mysql_select_db("amxbans"); $variable = array(); $result = mysql_query("SELECT admin_id FROM amx_admins_servers WHERE server_id=1 ORDER BY admin_id ASC") or die(mysql_error()); while($row = mysql_fetch_assoc($result)) { $variable[] = $row['admin_id']; foreach($variable as &$variables) { $value = $variables; } $foo = $variables; destroy_foo(); $resultnew = mysql_query("SELECT * FROM amx_amxadmins WHERE id='$foo' ORDER BY access"); while ($rownew = mysql_fetch_assoc($resultnew)) { $nickname = $rownew['username']; $endtime = $rownew['endtime']; $access = $rownew['access']; echo "<head>\n"; echo "<style type='text/css'>\n"; echo ".style2 {\n"; echo " color: #00C000;\n"; echo " font-weight: bold;\n"; echo "}\n"; echo ".style3 {\n"; echo " color: #E0A518;\n"; echo " font-weight: bold;\n"; echo "}\n"; echo ".style4 {\n"; echo " color: #C0C0FF;\n"; echo "}\n"; echo ".style5 {\n"; echo " color: #C0C0FF;\n"; echo " font-weight: bold;\n"; echo "}\n"; echo "</style>\n"; echo "</head>\n"; echo "<table cellspacing='1' class='listtable' width='100%'>\n"; echo "<tr bgcolor=/'#000000/'s>\n"; echo "<td height='16' width='5%' class='style4' style='padding-left: 7px' ><center>$foo</center></td>\n"; echo "<td height='16' width='40%' style='padding-left: 7px' class='style3'>$nickname</td> \n"; echo "<td height='16' width='35%' class='style4' style='padding-left: 7px' >$access</td>\n"; echo "<td height='16' width='20%' class='style5' style='padding-left: 7px' >$endtime</td>\n"; echo "</tr>\n"; echo "</table>\n"; } } ?> The second result $resultnew = mysql_query("SELECT * FROM amx_amxadmins WHERE id='$foo' ORDER BY access"); The ORDER BY access doesn't work. It orders that same way like the id's form fist tables has been getted. I need: $resultnew = mysql_query("SELECT * FROM amx_amxadmins WHERE id='$foo' ORDER BY access"); get working. Mart
×
×
  • 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.