-
Posts
812 -
Joined
-
Last visited
Posts posted by techker
-
-
hey guys i recently had to re upload all my index files on my servers cause the got hacked!
what a piss off!lol
so i had to download an old script that was install..webcalendar 1.2
but know i get an error
Fatal error: Call to undefined function access_can_view_page() in /home/soul3438/public_html/GYMSOFT/Calendar/index.php on line 9
<?php /* $Id: index.php,v 1.16.2.2 2007/08/06 02:28:30 cknudsen Exp $ */ include_once 'includes/init.php'; // If not yet logged in, you will be redirected to login.php before // we get to this point (by init.php included above). if ( ! empty ( $STARTVIEW ) ) { $page = get_preferred_view (); if ( access_can_view_page ( $page ) ) send_to_preferred_view (); else { // User's preferences need to be updated to their preferred view. if ( access_can_access_function ( ACCESS_PREFERENCES ) ) do_redirect ( 'pref.php' ); // User does not have access to preferences... // So, we need to pick another page. if ( access_can_access_function ( ACCESS_WEEK ) ) do_redirect ( 'week.php' ); elseif ( access_can_access_function ( ACCESS_MONTH ) ) do_redirect ( 'month.php' ); elseif ( access_can_access_function ( ACCESS_DAY ) ) do_redirect ( 'day.php' ); elseif ( access_can_access_function ( ACCESS_YEAR ) ) do_redirect ( 'year.php' ); // At this point, this user cannot view the preferred view in their // preferences (and they cannot update their preferences), and they cannot // view any of the standard day/week/month/year pages. All that's left is a // custom view that is either created by them or a global view. if ( count ( $views ) > 0 ) do_redirect ( $views[0]['url'] ); // No views either? You gotta be kidding me! ;-) } } else do_redirect ( 'month.php' ); ?>
-
need something else?
-
hey guys i have this code that send send me an email when i insert a=data in my databse.
now it was working fine ..lol intill i messt arround with it.
and is it possible to add a button with a link in the email that is sent ??
<?php // function declaration, placed at beginning of script with //other function declarations function SubscrNotifMailer($message, $headers) { $to = "my email"; $subject = "Installation Confirmation"; mail($to, $subject, $message, $headers); } ?> <?php $client_id=$_POST['client_id']; $comp_name=$_POST['comp_name']; $num_units=$_POST['num_units']; $extra=$_POST['extra']; $done=$_POST['done']; $not_complete=$_POST['not_complete']; $installer=$_POST['installer']; $date = date("Y-m-d"); //$data = addslashes(fread(fopen($form_data, "r"), filesize($form_data))); // Connects to your Database mysql_connect("localhost", "ll", "l") or die(mysql_error()) ; mysql_select_db("l") or die(mysql_error()) ; //Writes the information to the database mysql_query("INSERT INTO install (client_id,comp_name,num_units,extra,done,not_complete,installer,date) ". "VALUES ('$client_id','$comp_name','$num_units','$extra','$done','$not_complete','$installer','$date')"); //Tells you if its all ok $id= mysql_insert_id(); // function call, placed right after record insertion of new //subscription $nl = chr(10); $emailStr = 'Email : ' . $email . $nl ; $client_id = 'Client ID : ' . $_POST['client_id'] . $nl ; $comp_name = 'Comp Name: ' . $_POST['comp_name'] . $nl; $done = 'Is Job Done : ' . $_POST['done'] . $nl ; $not_complete = ' Is Job not finisht : ' . $_POST['not_complete'] . $nl ; $installer = 'Installer: ' . $_POST['installer'] . $nl ; $date = 'date done: ' . date("Y-m-d") . $nl ; $num_units = 'Number of Units installed: ' . $_POST['num_units'] . $nl ; $message = $emailStr . $client_id . $comp_name . $done . $not_complete . $installer . $date . $num_units ; $headers .= "Reply-To: ".$email."\r\n"; ini_set("sendmail_from", "SubscrNotifMailer@gmail.com"); SubscrNotifMailer($message, $headers); // call mailer echo "<p>This file has the following Database ID: <b>$id</b>"; echo "You'll be redirected to Home Page after (2) Seconds"; echo "<meta http-equiv=Refresh content=2;url=job.php>"; ?>
-
hey guys i was wondering if it is possible to send an email to your database to insert the information in the email?
like when i do a quote for a client i sometimes forget or put it on a post it to loose it..lol
so i can take my blackberry and send an email to my server to insert the information?
found this but...complicated..lol
For anyone interested, I have created a c++ user defined function that can send mail without having to have SMTP installed on the server. It uses Microsoft's CDO to relay via any SMTP server.
Usage:
Compile this project (http://www.divshare.com/download/7121306-6e1) using Visual Studio Express and place the DLL in the /lib/plugins directory. In MySQL;
create function SendMail returns string soname 'SendMail.dll';
select SendMail('to@address','from@address','Subject','Message','smtp.domain');
Enjoy
-
cool i will try it out thx!!
-
Hey guys i want to get in to programing and i have a project i want to start and it requires me to get info from a mysql server .
so i google on vista 64 bit odbc connection and found that you need to go in the
C:\Windows\syswow64\odbcad32.exe
so that worked .
now when i click on new connection i have all microsdoft options but no MYSQL connection availible?do i need to install something in my pc?drivers?
-
that can be it.(
see it is a broken link maybe the icon.
it is showing that cause the pdf does not show.its like if the pdf and php echo don't mix..
like i said if i view source i can see that the link is good.
-
no..i removed it cause it is not online yet.
-
<? mysql_connect("localhost", "svvvvr", "tecvvvvr") or die(mysql_error()) ; mysql_select_db("v") or die(mysql_error()) ; $q3 = "SELECT * FROM `promo_site` WHERE `current` = 'YES' LIMIT 0 , 30"; $res3 = mysql_query($q3); $row3 = mysql_fetch_assoc($res3); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> </head> <body> <table width="239" border="0"> <tr> <td width="233"><a href="http://link/resources/PROMO/<?php echo $row3['doc'] ?>"><img src="images/logo_banner_promo.jpg" width="236" height="173" /></a> </td> </tr> </table> </body> </html>
this is with a link on image.cause i had to link it to the doc so it can work..
or
echo '<img src="/link/'. $row3['doc'] .'" border="0" alt="" width=130/>
<br />'; this only showed a broken image icon..
the doc in databse hase the full name included the extension.
-
thats it?it just gets the info in the database and posts it.
-
Hey guys i have a prob showing a pdf file?
its funny cause i can't seem to show the pdf file but if i fallow the link it is good?
does php prevent pdf?
here is what im talking about.
so i have an admin panel to upload the specials of the month in pdf format.
so i put a button on my index page and it opens up a query page:
$q3 = "SELECT * FROM `promo_site` WHERE `current` = 'YES' LIMIT 0 , 30"; $res3 = mysql_query($q3); $row3 = mysql_fetch_assoc($res3); cause he can select in the admin if it is a current promo or not(list box yes or no) php on the page <a href="http://l.....link/GYMSOFT/resources/PROMO/<?php echo $row3['doc'] ?>
so it should show the doc in the directory,but all i see is a broken image icon?and if i view the source i can see the link is perfect,caopy and paste it in a difrent window and it works???
-
ok so i got it going.
created a variable :$curr_month = date("m");
then select * from pormotions were month = $curr_month ;
i need to change the way the months were iserted.
now they insert 01(jan) 02(feb)...
-
found this to..
SELECT * FROM table WHERE YEAR(date) = YEAR(CURDATE()) AND MONTH(date) = MONTH(CURDATE())
-
well i tryed alot..lolforget but i figured that i can use the month()
SELECT MONTH('2009-09-00');
cause they say with 00 -00 it shows the default..doesnt work
so i tryed select all from promotions were month =NOW()
no success
is there a current month() ?
in my fled the months are as is:JANUARY,FEB...
but i have a date filed to that maybe i can use.it iserts the date of the creation of the promotion?
-
it does ya but i need to extract the promotions for every month.that is why i need it to select the promos from current month
-
extract the promotion of the month
in the month field the client inserts the month.
-
hey guys i have a promo table with a filed that inserts the month (list box select)..
i need to do a query to select the current month from the month table?
i have tryed month() now()...
-
ya thx!
-
i figured out that the field was set to varchar not date..
-
anybody?
-
is there a way to make it stay?cause the next day it disappears since it is only set to current day..
-
nice...i should of looked at select count...lol
-
Hey guys!!
i have a quick question.i have a database that holds clients info
name..number..payment method..
i need to count how many clients payed by visa
so the tables name is new_members
the row is called mode
i got up to here but it always shows 0
SELECT COUNT( `mode` ) AS TotalNumber, SUM( `mode` ) AS TotalPrice FROM `new_members` WHERE `mode`= CHEQUE <?php echo $row3['TotalPrice'] ?> [code] i used a query from another page in my script..
-
french
in MySQL Help
its funny cause i noticed my charset on my page was at utf-8 thinking it would be good for french..so i set it to ISO-8859-1 and now it works.
as for the mysql i will try diffrent ways..thx
tax..
in Applications
Posted
Hey guys i need make an invoice maker and im stuck on the calculations?
like total and tax...
can somebody guide me to a tutorial or demo script?