php

How to assemble an admin menu dynamically?

Hi folks, I'm trying to work out the best way to assemble the navigation menu of my admin application dynamically, based on the result of going through each of the objects on each of the pages, such that only pages with objects that are available to the user are displayed in the menu! As a simple example, say I have two user types; SEC...

Asterisk billing system with PHP

Hi, I am trying to develop billing system for asterisk but i dont know howto start.Is there any suggestion for this?I have looked at free billing systems for asterix but their systems are very complicated and i asked here. Thanks for advance... ...

Can you solve this in brief code with different variables

Please refer to my previous questions ...

How to Read RS232 Serial Port in PHP like this QBasic Program

I'm trying to port the following small QBASIC program (which works 100%) to PHP: OPEN "com1:2400,n,8,1,DS," FOR RANDOM AS #3 OPEN "data.dat" FOR OUTPUT AS #2 REM read 17 chars from the port scale$ = INPUT$(17, #3) PRINT scale$ WRITE #2, scale$ CLOSE #2 CLOSE #3 SYSTEM Currently I'm calling it in its compiled (exe) form from PHP (on WA...

CodeIgniter MySQL Query not returning any data, even though there definitely is data to be returned!

Hi there! I have a CI Model set up with this function and ActiveRecord: function get_open_competitions() { $this->db->select('*, TO_DAYS(closingdate) - TO_DAYS(CURDATE()) AS days') ->from('challenges') ->where('closingdate >','CURDATE()') ->order...

PHP String returns with HTML

I want to return HTML string as follows from my controller. $returnValue = "<a onclick='demosuccess(". chunk_split( base64_encode( $details['clientid'] ) ). ",".chunk_split( base64_encode( $details['email'] ) ). ",1)' >$this->lang->line('link_sendactivation')</a>"; But,it getting error.I tried it by different combinations...

MySQL/PHP: Find previous / next row

Hi I'm making a forum for skills. I want to print a previous and/or next link on the thread page. So if theres a thread with a larger and/or lesser number than current, print it in lionk. And also i wanna limited only threads from the same forum as the thread im viewing is located in. Basically likes this forum: http://forum.tibia.co...

Is there Any Standard Framework for php?

There are many PHP Frameworks out there but i want to know is there a standard Objective framework with a great architecture similar J2SE or .NET Framework? I see many similar questions like this but most of them are about beginners or special kind of programming. ...

How Do I Encode a String in Base36 in PHP?

I have learned how to Base16 encode a string in PHP, but how do I Base36 encode and decode a string in PHP? Note I need this to make the string work in URLs. BONUS: And if you know how to compress the string slightly first before doing the Base36, that would be even cooler! :) ...

PHP - Assigning values within if statements

Hi Guys, I read the other day that assigning values within if statements isn't such a great idea. To be honest i actually use this quite a lot e.g. if(isset($_POST) && $post = $_POST) { print_r($post) } Any idea why that isn't optimal? Thanks in advance! ...

Hudson keeps failing with Phing AND Ant. Any hints?

Let's just skip right to the good stuff... errors I'm getting from the console when running Ant: phpunit: [exec] PHPUnit 3.2.16 by Sebastian Bergmann. [exec] [exec] Class /var/lib/hudson/jobs/Goals/workspace/Goals/AllTests could not be found in /var/lib/hudson/jobs/Goals/workspace/Goals/AllTests.php. [exec] Result:...

PHP Tokens - finding user defined constants.

Hi, got a reall head scratcher. Im trying to make a PHP obfuscator ( http://www.actwebdesigns.co.uk/web-design-blog/actobfuscator-free-open-source-php-obfuscator/ ) I've hit a little problem tho. I cant find a guaranteed way of finding a user defined constant. some of my the token_name()'s return as T_STRING and others as T_CONSTANT_E...

how to validate multiple input type files with jquery validator plugin

Hello All, I am using jQuery validator plugin, i stuck in a problem during validating images, i have 4 input type file to upload image (where one is on page and 3 are coming dynamically)regarding one movie, uploading image is not essential but, if someone wants to upload then it should be with valid extension means only jpg.jpeg and ...

What Framework is the best for my next MLM project?

hi, i have already building(Under Development "Http://dollardazzler.biz") a MLM project with cakephp framework. Now i have another upcoming project in my hand with same MLM features,i could use cakephp for that as well be cause i already have the models/controllers and the db schema but i want to do some different this time . So i am a...

Track Page Views using PHP

I'm looking for a way to track the number of visits to a page, without counting duplicates (like someone hitting refresh several times) and I'd like to figure out the best way to do it without keeping track of every single IP address to view the page. Perhaps a cookie? Any other suggestions? ...

Database design for items that have restricted shipping regions

I am designing the database for a shopping cart and I am having trouble deciding which way to approach this problem. There are three tiers that can items can be restricted to: 1) Local Delivery Only 2) Shipping Available a) Country b) State c) Region I am thinking to go with a structure like this: product_shipping_res...

send value one page to another page by using html and php

I need to send 3 text box and one drop down value to a different page,I can not use the submit button i have to use the image. code:- <table width="70%" border="0" align="right" cellpadding="0" cellspacing="5"> <tr> <td width="11%" align="right" valign="middle" class="text6">Type:</td> <td width="12%" align="right" valig...

Zend PHP qualification

The company I work for paid alot of money to put me on the Zend PHP programming course, i completed all the online classes and tutorials all I need to do know is book the test and pass. Any advice from anyone? areas i should concentrate on? materials ? blogs? ...

Simple php/mysql problem

I have a "Jump To"-select box on my forum. I want the forum that the thread I'm currently viewing to be SELECTED in the selectmenu. I tried this: $threadinfo = mysql_query("SELECT * FROM threads WHERE id = $threadid"); $thread = mysql_fetch_assoc($threadinfo); $forums = mysql_query("SELECT * FROM forums ORDER BY name ASC"); while($f...

Zend_OpenId and Google login

i have done a very simple setup with a test myopenid account require_once "Zend/OpenID/Consumer.php"; $openid_id = "http://testphp.myopenid.com/"; $consumer = new Zend_OpenId_Consumer(); if (!$consumer->login($openid_id, "http://localhost/php/openid/oid_return.php")) { die("failed"); } echo "OK"; when i try to use Google OpenID (...