[PHP] Apache's .htaccess issue with absolute addressing

2011-11-27 Thread Grega Leskovšek
That is problem on my skavt.net server, but also an issue of knowledge.
I need to access my css/js/pic files with absolute addressing(starting
with /)  I can do this on my home server if I start from /var/www and
not from /var/www/peace-refuge/, but when I upload to skavt.net server
in the www/ (my root dir) the thing doesn't work any more.
What do I need to write in .htaccess file in base dir
to mark for example /www/ is base dir and when accessing a file with /my.css
will look in /www/my.css address and not in somewhere else I do not
where and I do not know how to figure that out?

I tried this
RewriteBase /www/
writing in the file /www/.htaccess

but it doesn’t work. Please help me! Thanks in advance, Grega from Slovenia

♥♥♥ When the sun rises I receive and when it sets I forgive! ♥♥♥
http://moj.skavt.net/gleskovs/    ♥ Always, Grega Leskovšek

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Fwd: i, em, strong and b in html5h

2011-08-11 Thread Grega Leskovšek
There was a topic on that a while ago and I am now reading Introducing
HTML 5 from Bruce Lawson and Remy Sharp (pages 58-59) in mental
hospital. It is not
so bad as it seems, but I do not read email every day. They do not
have wireless :(

All four are valid in html5: em and strong marks up for
emphasis/importance that subtly changes the meaning of the sentence.
Examples: Do you live in Paris? pNp, my emname/em is Paris. I
live in emLjubljana/em./ppstrongWarning! This is a nudistic
beach/strong/p

i:alternate voice or mood, taxonomic designation, technical term,
idiomatic phrase from another language, a thought, a ship name or
prose whose typographical presentation is italicized
pThe iTitanic/i sails./ppThe design needs a bit more i
lang=frooh la la/i/ppiGluteus maximus/i

b:no extra importance, key words, document abstract, product names
in a review or just spans of text whose typicial typographic
presentation is boldened.
pI like bice cream/b, so for my birthday they gave me ban ice
cream maker machine/b

It is no longer necessary to put attributes in quotes unless there is
space in the attribute word. But I still put them :).
small is now for smallprint copyright notice - the meaning of small
has changed/small

applet is deprecated, use embed instead and embed is not
deprecated anymore.

And it is a very good book so far (two chapters).

♥♥♥ When the sun rises I receive and when it sets I forgive! ♥♥♥
˜♥ - http://moj.skavt.net/gleskovs/ - ♥ Always, Grega Leskovšek

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] mysql insert internal server error 500

2011-05-16 Thread Grega Leskovšek
$ime=$_COOKIE['user'];
$dolgF=filesize($filename)
INSERT INTO `friendlyCMS`.`log` (`imepriimek`, `clock`, `action`,
`onfile`, `filesize`) VALUES ( $ime, CURRENT_TIMESTAMP,
'saved',$filename, $dolgF);

What is wrong with this?
PS First column of the log table is idlog primary key autoincrement
not null - I suppose I omit this when adding to table?
Thanks in advance, Grega
-- When the sun rises I receive and when it sets I forgive -
http://moj.skavt.net/gleskovs/
Always in Heart, Grega Leskovšek

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] mysql error

2011-05-05 Thread Grega Leskovšek
Can smbd please look  at this sentence - I got an error and do not
know how to fix it - I am still very unfamiliar with MYSQL:

CREATE TABLE log (  idlog int auto_increment not null,  imepriimek
varchar(50),  clock timestamp,  action varchar(30),  onfile
varchar(100), filesize float(6,2), uniqueid(idlog) );

ERROR 1064 (42000): You have an error in your SQL syntax; check the
manual that corresponds to your MySQL server version for the right
syntax to use near '(idlog) )' at line 1

-- When the sun rises I receive and when it sets I forgive -
http://moj.skavt.net/gleskovs/
Always in Heart, Grega Leskovšek

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] opening a new window from php script

2011-03-28 Thread Grega Leskovšek
I would still like to offer in my CMS to be able to choose in which
browser I want to display the current page.  Is this possible or I in
program can open only default browser? Can I at least choose wheter to
open a new tab or a new window?
Thanks in advance,
-- When the sun rises I receive and when it sets I forgive -
http://moj.skavt.net/gleskovs/
Always in Heart, Grega Leskovšek




2011/3/27 Richard Quadling rquadl...@gmail.com:
 On 26 March 2011 10:22, Ashley Sheridan a...@ashleysheridan.co.uk wrote:
 On Fri, 2011-03-25 at 18:05 -0700, Tommy Pham wrote:

 On Fri, Mar 25, 2011 at 2:59 PM, Grega Leskovšek legr...@gmail.com wrote:
  I am working on CMS designed to those who are unfamiliar  with a
  computer world and I want to offer a task where on a push of a button
  it will save current working page in textarea/s and open this page in
  a new tab or in a new window.

 PHP is server side.  push of a button is client side.  Google
 javascript+onClick.

  I googled some, but am still not sure how can I do it.
 
  Do I have to use target=_new - I can not do this - I am working this
  for my University seminar and it has to be valid HTML5.
 
  Please help me improve my plan
  1. I check wheter the user is using windows, linux, mac and then show
  appropriate possibility of all browsers for the targeted platform
  (WIN:IE,SA,FF,CH,OP, LINUX:FF.CHROMIUM and I need help for the mac
  also besides SA and FF what does it have among browsers?)

 Have you tried to google for browser versions and platform?  While
 searching for the same thing long time ago, I found a site that lists
 them.  Also, note that since you'll be using onClick for push of a
 button, beware of Javascript version difference among the browsers.
 IIRC, IE is supports 1.3 and FF supports 1.9.  Haven't tested the
 others so couldn't tell you.

  2. When the browser clicks button with the image of browsers inside
  anchor I target _new and location of the current file
 
  ?1 How can I offer option to open a new window not a new tab?
  ?2 How can I avoid the target attribute?
  ?3 How can I make a click on an image to produce action - or what do
  You suggest me to use - I would prefer img element not  button with an
  image - how can I do this?
 
  Once I will finish it I will offer here software to everybody so I
  will be able to get some response and improve it and this is one of
  the major problems otherwise it is already functional.
 
  Please help me, thanks in advance - or ? You think I could do this better 
  in JS?
  -- When the sun rises I receive and when it sets I forgive -
  http://moj.skavt.net/gleskovs/
  Always in Heart, Grega Leskovšek
 

 I don't know if you have Flash in your tool belt but have you
 considering using it?  It may simply your life with various browsers
 and their versions across different platforms.  Note: Flash does tend
 to be sluggish in terms of loading time and how much of what you need
 the Flash to do.

 Regards,
 Tommy



 I'd avoid trying to guess the browser entirely. There are always loads
 of fringe browsers that are in use, and things like Wine that allows
 people to run IE on Linux, as well as other Windows-based browsers too.
 As soon as you're trying to write a script that detects a specific
 browser and does something then you're already doing it wrong. Don't
 test for the browser, test for the feature that you're using. Javascript
 has a useful function called hasFeature which may help here.

 The main reason why it's bad to try and detect a browser and act on it
 is because you can get many browsers that work across a wide variety of
 operating systems such as Fx  Opera, which vary from version to version
 and OS to OS.

 Thanks,
 Ash
 http://www.ashleysheridan.co.uk




 A common approach to web dev is to start with a dumb page - just HTML
 and then add CSS and JS. This is known as progressive enhancement.

 Another approach which I've read about recently is called regressive
 enhancement. Essentially, you start at the cutting edge, using the
 functionality that you want (canvas for example), and then add in the
 missing features.

 As more of the browsers that support the newer features become the
 popular ones, you end up with less code providing support for older
 browsers. So, when every browser supports canvas, you don't need to
 install any code to emulate the canvas. Modenizr and YepNope are the
 tools I read about for this.

 --
 Richard Quadling
 Twitter : EE : Zend
 @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] opening a new window from php script

2011-03-25 Thread Grega Leskovšek
I am working on CMS designed to those who are unfamiliar  with a
computer world and I want to offer a task where on a push of a button
it will save current working page in textarea/s and open this page in
a new tab or in a new window.
I googled some, but am still not sure how can I do it.

Do I have to use target=_new - I can not do this - I am working this
for my University seminar and it has to be valid HTML5.

Please help me improve my plan
1. I check wheter the user is using windows, linux, mac and then show
appropriate possibility of all browsers for the targeted platform
(WIN:IE,SA,FF,CH,OP, LINUX:FF.CHROMIUM and I need help for the mac
also besides SA and FF what does it have among browsers?)
2. When the browser clicks button with the image of browsers inside
anchor I target _new and location of the current file

?1 How can I offer option to open a new window not a new tab?
?2 How can I avoid the target attribute?
?3 How can I make a click on an image to produce action - or what do
You suggest me to use - I would prefer img element not  button with an
image - how can I do this?

Once I will finish it I will offer here software to everybody so I
will be able to get some response and improve it and this is one of
the major problems otherwise it is already functional.

Please help me, thanks in advance - or ? You think I could do this better in JS?
-- When the sun rises I receive and when it sets I forgive -
http://moj.skavt.net/gleskovs/
Always in Heart, Grega Leskovšek

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] protecting email addresses on a web site

2010-11-16 Thread Grega Leskovšek
I tried this:
?php echo span
class=\safety\sssa/moc.li...@ood.sulpcoj\moc.li...@ood.sulpcoj:otliam\=ferh
a/span;
?
and css:
.safety { direction:rtl; unicode-bidi: bidi-override; }
for the address jocplus@gmail.com
but I haven't managed it to display properly
Could someone please direct me, I believe if I put the
a class=safety href=mailto:jocplus@gmail.com;vicaversa/a...
it does not really protect the email address, because in mailto: it
has to be as defined jocplus@gmail.com
Thanks,
-- When the sun rises I receive and when it sets I forgive -
http://moj.skavt.net/gleskovs/
Always in Heart, Grega Leskovšek




2010/6/15 Ashley Sheridan a...@ashleysheridan.co.uk:
 On Tue, 2010-06-15 at 13:02 -0400, HallMarc Websites wrote:


 -Original Message-
 From: Ashley Sheridan [mailto:a...@ashleysheridan.co.uk]
 Sent: Monday, June 14, 2010 10:52 AM
 To: Dotan Cohen
 Cc: HallMarc Websites; David Mehler; php-general
 Subject: Re: [PHP] protecting email addresses on a web site

 On Mon, 2010-06-14 at 17:50 +0300, Dotan Cohen wrote:

  On 14 June 2010 15:36, HallMarc Websites sa...@hallmarcwebsites.com
 wrote:
   Another is a CSS solution where you type the email address backwards and
   then use the CSS style declaration:
   style=direction: rtl; unicode-bidi: bidi-override;
  
 
  How does that work with screen readers? How about copy-paste?
 


 I don't think there's an accessible way of doing this. Anything that
 allows a screen reader to speak the email address would also be
 susceptible to spammers email scrapers.

 Thanks,
 Ash
 http://www.ashleysheridan.co.uk



 Copy-n-paste just gives you the email address backwards; screen readers,
 because we are using logical ordering and it is stored in memory the way we
 expect to read it, will read it correctly.

 I was not aware that email harvesters used screen readers. Do you have some
 documentation I could read to get up to speed on this?

 Marc Hall
 HallMarc Websites
 So many spammers, so few bullets...


 __ Information from ESET Smart Security, version of virus signature
 database 5199 (20100615) __

 The message was checked by ESET Smart Security.

 http://www.eset.com




 I didn't say the harvesters used screen readers. I'm saying that if
 something is in plain text that a screen reader can understand, what's
 to stop an email address harvester? It's not worth their time to analyse
 every image (think about where Google is with image searching right now,
 and they have a lot more resources at their disposal) but it is easy
 enough to read text in a web page. At a push, it's possible to believe
 that some might be using rendered CSS to see how an email is rendered.

 Thing is, it's nigh on impossible to hide an email address. Use it once
 on a mailing list like this and it's there for the whole world to see on
 archive listings. I even though that my email wouldn't be found in
 a .pdf CV I'd made, but thanks to Google it is now!

 Basically, it might not be worth the effort to hide email addresses, and
 instead see about setting up spam filtering at the server level. You
 don't have to download and filter it your end, and it saves on
 bandwidth.

 Thanks,
 Ash
 http://www.ashleysheridan.co.uk




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] XAMPP for windows (7)

2009-12-03 Thread Grega Leskovšek
Can smbd please explain me in XAMPP for windows what does SVC
checkboxes at modules Apache, Mysql, FileZilla, Mercury ... stands for
- when must they be checked and why?
The first time I start a service (eg Apache) it asks me where should I
allow it to communicate. Primarily it is checked only home network.
Should I  also allow this services to communicate on public networks?
- And how is this at home different them at library where different
people will use them?

Because I clicked too quick in allowing a service to communicate
through a network (home/public access) where can I change this in
windows 7 and win xp?

Thanks in advance, always,
-- Peace refuge: http://users.skavt.net/~gleskovs/
When the sun rises I receive and when it sets I forgive;) Grega Leskovšek

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] variable

2009-09-24 Thread Grega Leskovšek
Suppose I have a variable $i = 0 or 1 or 2
and I have variables $item0, $item1 and $item2
how do I print the variable $item0 using a combination of variable $item and
variable $i?
or with this code it gives me an error:
$i = 0;
$item0 = test;
echo $item$i; #how do I properly use this variable $item with $i?

Thanks in advance, Yours, Grega


-- Peace refuge: http://users.skavt.net/~gleskovs/
When the sun rises I receive and when it sets I forgive;) Grega Leskovšek


[PHP] mail attachment

2009-09-05 Thread Grega Leskovšek
How do I attach a file in mail function or do I have to use PEAR (and if how
...). What are the advantages of PEAR? When do You suggest to use PEAR?
Thanks in advance,
-- Peace refuge: http://users.skavt.net/~gleskovs/
When the sun rises I receive and when it sets I forgive;) Grega Leskovšek


[PHP] downloading winword mp3 files the fancy way through a browser

2009-08-26 Thread Grega Leskovšek
I tried to download the file from another server the fancy way in PHP, but
it just display blank screen. Can You please look at my code:

?php
$filepath = http://aa.yolasite.com/resources/happytears.doc;;
// $filepath = http://users.skavt.net/~gleskovs/else/happytears.doc;;
  if (file_exists($filepath)) {
 header(Content-Type: application/force-download);
 header(Content-Disposition:filename=\happytears.doc\);
 $fd = fopen($filepath,'rb');//I tried also just 'r' and am not clear on
which documents should I add b for binary? As I understand only text plain
files and html files and php etc files are without 'b'. All documents,
presentations, mp3 files, video files should have also 'b' for binary along
r. Am I wrong?
 fpassthru($fd);
 fclose($fd);
  }
?
Both filepaths are valid and accessible to the same document. I double
checked them. Please help me. Thanks in advance, Yours, Grega


[PHP] inserting php value in html shorter wayand downloading winword mp3 files the fancy way

2009-08-24 Thread Grega Leskovšek
Hi, I am still a newbie in php. Is there a shorter way to include a php
value in a form?
input type=text name=fullname size=40 value=?php echo
{$user['fullname']}; ? /
is it possible to do smth like this ?=php {$user['fullname']}; ? like in
JSP?
Can I omit the last whitespace before the closing ? ?

***
I tried to download the file from another server the fancy way in PHP, but
it just display blank screen. Can You please look at my code:

?php
$filepath = http://aa.yolasite.com/resources/happytears.doc;;
// $filepath = 
http://users.skavt.net/~gleskovs/else/happytears.dochttp://users.skavt.net/%7Egleskovs/else/happytears.doc
;
  if (file_exists($filepath)) {
 header(Content-Type: application/force-download);
 header(Content-Disposition:filename=\happytears.doc\);
 $fd = fopen($filepath,'rb');//I tried also just 'r' and am not clear on
which documents should I add b for binary? As I understand only text plain
files and html files and php etc files are without 'b'. All documents,
presentations, mp3 files, video files should have also 'b' for binary along
r. Am I wrong?
 fpassthru($fd);
 fclose($fd);
  }
?
Both filepaths are valid and accessible to the same document. I double
checked them. Please help me. Thanks in advance, Yours, Grega

-- Peace refuge:
http://users.skavt.net/~gleskovs/http://users.skavt.net/%7Egleskovs/
When the sun rises I receive and when it sets I forgive;) Grega Leskovšek