Welcome Guest, Not a member yet? Register   Sign In
  Computer Adaptive test
Posted by: El Forum - 06-05-2008, 08:44 AM - No Replies

[eluser]Unknown[/eluser]
Hi,
I need to design a php code using mysql to develop computer adaptive test(for eg. GRE online test).Can anybody plz offer any help in this???


  Alright regex masters... help...
Posted by: El Forum - 06-05-2008, 08:06 AM - Replies (1)

[eluser]Brandon Dickson[/eluser]
I need to pull

C:\Documents and Settings\dicksonb\Desktop\ajax-loader.gif

from:

Code:
L���###�����À������F›��� ���²AÙ#v3È#–²ú>v3È#n#I#v3È#. ������#���������������T�R�2�. ��~7G‹ �AJAX-L~1.GIF��6�#�#�ï¾~7J‹~7G‹#���a�j�a�x�-�l�o�a�d�e�r�.�g�i�f���#���t���#���#���#���8�������s���#���#���#ú—À#���IBM_PRELOAD�C:\Documents and Settings\dicksonb\Desktop\ajax-loader.gif��I�.�.�\�.�.�\�.�.�\�.�.�\�.�.�\�.�.�\�D�o�c�u�m�e�n�t�s� �a�n�d� �S�e�t�t�i�n�g�s�\�d�i�c�k�s�o�n�b�\�D�e�s�k�t�o�p�\�a�j�a�x�-�l�o�a�d�e�r�.�g�i�f�*�C�:�\�D�o�c�u�m�e�n�t�s� �a�n�d� �S�e�t�t�i�n�g�s�\�d�i�c�k�s�o�n�b�\�D�e�s�k�t�o�p�`���#�� X�������nissa�����������°$}Bô#éJ‡¹‚Ò"N#U(EM•lÜ#±)�#AC#^°$}Bô#éJ‡¹‚Ò"N#U(EM•lÜ#±)�#AC#^����

and I've gotten

Code:
'/.*(\w:\\\[^\x3F]+).*/'

so far which gives me

Code:
C:\Documents and Settings\dicksonb\Desktop\ajax-loader.gif��I�.�.�\�.�.�\�.�.�\�.�.�\�.�.�\�.�.�\�D�o�c�u�m�e�n�t�s� �a�n�d� �S�e�t�t�i�n�g�s�\�d�i�c�k�s�o�n�b�\�D�e�s�k�t�o�p�\�a�j�a�x�-�l�o�a�d�e�r�.�g�i�f�*�C�:�\�D�o�c�u�m�e�n�t�s� �a�n�d� �S�e�t�t�i�n�g�s�\�d�i�c�k�s�o�n�b�\�D�e�s�k�t�o�p�`���#�� X�������nissa�����������°$}Bô#éJ‡¹‚Ò"N#U(EM•lÜ#±)�#AC#^°$}Bô#éJ‡¹‚Ò"N#U(EM•lÜ#±)�#AC#^����

I figured that [^\x3F]+ would match anything that's not \x3F ( the '?' ) one or more times, and as soon as it finds an \x3F it would close the group...

any ideas?

Thanks!
-Brandon


  Detect Function In Controller
Posted by: El Forum - 06-05-2008, 08:00 AM - Replies (6)

[eluser]gedev2006[/eluser]
Hi

I have a class for example with a constructor. The construct function detects if a user is logged in or not before allowing access to any functions.

What I want is to be able for the constructor to detect which function the user is trying to access to allow specific functions to be used regardless of the logged in state. This can be done in each function that needs a login, but there are allot of functions and would rather have 1 check only

Thanks


  URL Helper Extended - anchor_img() added [moved]
Posted by: El Forum - 06-05-2008, 07:59 AM - No Replies

[eluser]Isern Palaus[/eluser]
http://ellislab.com/forums/viewthread/81770/

This needs to be to "Ignited Code", I think that fits more than this sub-forum.


  The PHP Benchmark - (news)
Posted by: El Forum - 06-05-2008, 07:24 AM - Replies (1)

[eluser]Tony Nash[/eluser]
I found this link today!

http://www.phpbench.com/

I think it is worth for all PHP developers. Smile


  Looking for Solution of CI config
Posted by: El Forum - 06-05-2008, 07:06 AM - Replies (1)

[eluser]vps4[/eluser]
usually, we put config setting in the database
but CI's config file loaded earlier than database library
now , the problem is : config must get through database library

my Solution is :
write a Model
but I think it's not good.

for example: some code in my Model

Code:
$query = $this->db->get('setting');

and add it to CI config

Code:
$this->config->set_item('setting', $this->setting);

and in the Controller

Code:
$something = $this->config->item('something', 'setting')

I almost collapsed, It make the simple things complicated
Although I have written to solve this problem

Is anybody have a good idea?


  HTML Helper Extended - script_tag() added [moved]
Posted by: El Forum - 06-05-2008, 06:44 AM - No Replies

[eluser]Isern Palaus[/eluser]
http://ellislab.com/forums/viewthread/81771/

This needs to be to "Ignited Code", I think that fits more than this sub-forum.


  MY_Model Database Abstraction Library -> Usefull or Useless ???
Posted by: El Forum - 06-05-2008, 04:36 AM - Replies (1)

[eluser]Unknown[/eluser]
Hello Everybody,

I would like to receive a feedback about a basic idea I have, that is related to the Model part of the MVC approach that I learned through the use of CI. The idea is as follows :

One recursive problem I find when I develop a brand new web application is the database layout that must match with its corresponding models. When I change something in a table, I have to modify my model as well.

Indeed I know that a good project planning involves creating the database model BEFORE coding it ^^ but because I don't have the basic knowledge of application pre-development, I just code my app "on the fly" and need to modify both database and model everytime.

My question is as follows :

Do you think it could be usefull to have a model that adapts the database to itself instead of having to adapt the model to the database structure. In other words, do you see an interest in having a few privates methods within a model that makes this model modify the database "on the fly".

For example let's say I want to create a Car Model, I would have to create let's say a Brand property, a Color property and a Model property. Once my model is finished, it could check to see if it can find the 'cars' table with only (and not more) three columns called 'Brand', 'Color' and 'Model', PLUS an "id" column and that's all. At this point a few possibilities arise :

1 - The table does not exists and the Model loads a particular method to create the table.
2 - The table exists but its structure does not match the exact structure of the model, then the models modify the structure without removing any table rows but only adapting the table structure to its own structure.
3 - The table exists and its structure match the structure of the model, everything's all right.

In this case, if I need to add a new column into my table, let's say 'Engine', I just have to declare a new property called 'Engine' with a default value of "Default" and the model will by itself update the table and its rows by adding a new column "Engine" and set all the existing rows with a "Default" value within the brand new "Engine" column.

Now and to finish, first of all pardon me for my french-like english ^^
And second : Can this concept be usefull or useless ? Maybe is there already another existing solution ? Or maybe there's no need to think this way : CI can already do that for you (maybe use some of the scaffolding functions within the model) ! Or maybe: this is a stupid idea, here's why: ... !

Whatever you think about this idea, please post your feelings ^^

Sincerely Yours ...


  variables persisting across multiple view loads
Posted by: El Forum - 06-05-2008, 02:39 AM - Replies (9)

[eluser]yelirekim[/eluser]
I'm not really sure whether this is a 'bug', but from a usability standpoint I think it would make sense for things to function as I'm about to describe.

Currently the variables that are extracted for use within views will persist across multiple calls to the load->view() function, if you use many views, and each view has similar page elements on it, it's difficult to keep all of the variable names straight and make sure you don't reuse them. For example:

Index function within Controller:

Code:
function index()
{
    $data['print'] = true;
    $data['content'] = "content";
    $this->load->view('debug',$data);
    $other_data['content'] = "other content";
    $this->load->view('debug',$other_data);
}

Debug View file:
Code:
<p>&lt;?php
    if(isset($print))
        print_r($content);
?&gt;</p>

Browser output:

Quote:content

other content

Expected output:
Quote:content

I know this seems trivial from the example, but in my case I have a 'Pagebuilder' library which loads in many views (header, navigation, content, footer) however one of the views and its associated data is specified outside of the library, as seen in the following example:

Code:
function index()
{
    $this->load->model('blog');
    $entries = $this->blog->get_entry_items(10);
    $data['content'] = $entries;
    //this function loads many other views besides the 'blog' view specified
    $this->pagebuilder->build('blog',$data);
}

I ran into a problem earlier where I had collisions with the names of the variables passed to the views. It's a problem that's easily solved by keeping track of all the variable names used within the views, but things working like this breaks the encapsulation of my Pagebuilder class. Ideally each of the variables passed to a view would be unset (or through some other method made inaccessible to other views) after that view is finished loading.

Anyone think this qualifies as a bug?


  Multi-User File Management with CodeIgniter?
Posted by: El Forum - 06-05-2008, 02:31 AM - Replies (3)

[eluser]Unknown[/eluser]
Hi Folks,

I'd like to hear some opinions of some experienced CI users.
I have to develop a file up-/downloading system with the following requirements:

- admin can add clients, projects and possibly subprojects (multiple projects for 1 client)
- clients can log in and see/download files that were uploaded for them (by
admin)
- clients can upload files into an selectable project (project must be assigned to customer, of course)
- clients and admin can write comments on uploaded files
- client gets notified by e-mail when admin uploads new file/writes new comment
- admin gets notified by e-mail when client uploads new file/writes new comment

I've already done a little, less complex, file uploading script in CodeIgniter using freak_auth for authentication and was quite satisfied with it. Just haven't really used models yet, that was rather dirty, I guess.

Now, I got attracted by cakePHP for it's built-in authentication. The documentation of cake seems bad compared to CI, though. Also Cake doesn't have a built-in upload helper class.

CakePHP on the other side doesn't seem to offer any helpers for file
uploads, which CI does.

I know, it's kinda stupid to ask inside the CI forums if you'd prefer some other framework over CI. I'd be just glad if someone would convince me, CI is the tool of the trade to get this thing well done Wink


Talking 'bout freak_auth: Is this great class still being activly developed? It's been a while since the last time it got updated, so I'm just wondering...

Regards,
Daniel


Welcome, Guest
You have to register before you can post on our site.

Username
  

Password
  





Latest Threads
Update to v4.5.1, same us...
by xsPurX
5 hours ago
SQL server connection not...
by falagar2k
8 hours ago
How to use Codeigniter wi...
by kenjis
8 hours ago
CVE-2022-40834 SQL Inject...
by kenjis
10 hours ago
Retaining search variable...
by pchriley
10 hours ago
Disable debug output in v...
by groovebird
11 hours ago
CI 4.5.1 CSRF - The actio...
by kenjis
Today, 12:39 AM
CodeIgniter v4.5.0 Releas...
by kenjis
Today, 12:35 AM
Cache best practice?
by BhambriRohunu
Yesterday, 11:10 PM
Bug with sessions CI 4.5....
by InsiteFX
Yesterday, 10:42 PM

Forum Statistics
» Members: 85,372
» Latest member: xshomnaycomvn
» Forum threads: 77,578
» Forum posts: 375,998

Full Statistics

Search Forums

(Advanced Search)


Theme © iAndrew 2016 - Forum software by © MyBB