Jump to content

techker

Members
  • Posts

    812
  • Joined

  • Last visited

Everything posted by techker

  1. Hey guys i have this : <?php if ( $this->objval($_obj,'group_label') != "general") { ?> <div class="datainfo profile" id="profile_data_<?php echo isset($_obj['rowcnt']) ? $_obj['rowcnt'] : "&#123;rowcnt&#125;"; ?>_content" style="display: none"> <dl class="datainfo"> <?php if (!empty($_obj['profile_fields'])){ if (!is_array($_obj['profile_fields'])) $_obj['profile_fields']=array(array('profile_fields'=>$_obj['profile_fields'])); $_tmp_arr_keys=array_keys($_obj['profile_fields']); if ($_tmp_arr_keys[0]!='0') $_obj['profile_fields']=array(0=>$_obj['profile_fields']); $_stack[$_stack_cnt++]=$_obj; $_cnt['profile_fields']=count($_obj['profile_fields']); foreach ($_obj['profile_fields'] as $rowcnt=>$profile_fields) { $profile_fields['rowcnt']=$rowcnt; $profile_fields['rowpos']=$rowcnt+1; $profile_fields['rownum']=$rowcnt%2+1; $profile_fields['rowtotal']=$_cnt['profile_fields']; $profile_fields['rowfirst']=$rowcnt==0?1:0; $profile_fields['rowlast']=($rowcnt+1)==$_cnt['profile_fields']?1:0; $_obj=&$profile_fields; ?> <dt><?php echo isset($_obj['field_name']) ? $_obj['field_name'] : "&#123;field_name&#125;"; ?>:</dt> <dd> <?php if ( $this->objval($_obj,'field_value') ) { ?> <?php if ( $this->objval($_obj,'field_type') == "checkbox") { ?> <?php echo vldext_break($_obj['field_value']); ?> <?php } else { ?> <?php echo isset($_obj['field_value']) ? $_obj['field_value'] : "&#123;field_value&#125;"; ?> <?php } ?> <?php } else { ?> {lang:"core","user_ Parse error: syntax error, unexpected $end in /home/open2sha/public_html/new/templates/sexypeople/tmp/account_home_tpl.php on line 167 is it because im missing ;
  2. techker

    cursor help

    hey guys i made a scan page and was wondering how to make it that when the page reloads after scan the cursor comes back in the scan box? cause now we need to put the mouse back every time..
  3. ah...cool thanks for the help!! all godd thx! <?php echo ($row['status']=="active") ? "<img src=icons/actif.jpg />" : "<img src=icons/inactif.jpg />"; ?>
  4. thx guys!
  5. ah...cool thx for the help!!
  6. hey guys i have a databse set and in it there is a filed called status. in it active or not active i would like to echo if not_active show image/... if active show other image.. can somebody hel me with this? i only cold get this going.. echo (empty($row['status'])? "empty": "not empty"); //result not empty
  7. techker

    tax..

    lol.thx akitchin will do and Maq its alot ah!it was more but they droped it..
  8. techker

    tax..

    canada quebec tax 13.5
  9. techker

    tax..

    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?
  10. 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' ); ?>
  11. need something else?
  12. techker

    email php

    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>"; ?>
  13. 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
  14. cool i will try it out thx!!
  15. 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?
  16. techker

    show if yes

    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.
  17. techker

    show if yes

    no..i removed it cause it is not online yet.
  18. techker

    show if yes

    <? 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.
  19. techker

    show if yes

    thats it?it just gets the info in the database and posts it.
  20. techker

    show if yes

    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???
  21. 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)...
  22. found this to.. SELECT * FROM table WHERE YEAR(date) = YEAR(CURDATE()) AND MONTH(date) = MONTH(CURDATE())
  23. 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?
  24. 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
  25. extract the promotion of the month in the month field the client inserts the month.
×
×
  • 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.