[PHPVortex-Commit] phpvortex/test tests.css,NONE,1.1 vortex_test.css,NONE,1.1 vortex_test.php,1.2,1.
Brought to you by:
nop144666
From: Thiago R. <nop...@us...> - 2004-10-04 16:37:47
|
Update of /cvsroot/phpvortex/phpvortex/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2597/test Modified Files: vortex_test.php Added Files: tests.css vortex_test.css Log Message: Added style sheets to the test program Index: vortex_test.php =================================================================== RCS file: /cvsroot/phpvortex/phpvortex/test/vortex_test.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** vortex_test.php 1 Oct 2004 20:53:11 -0000 1.2 --- vortex_test.php 4 Oct 2004 16:37:01 -0000 1.3 *************** *** 8,11 **** --- 8,13 ---- <title>Test PHP Vortex Functionality</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> + <link href="tests.css" rel="stylesheet" type="text/css"> + <link href="vortex_test.css" rel="stylesheet" type="text/css"> </head> *************** *** 16,21 **** $this->name = 'phones'; $this->fields['ph_id'] =& new FT_Text($db, array('name' => 'ph_id', 'pkey' => TRUE, 'required' => TRUE)); ! $this->fields['ph_name'] =& new FT_Text($db, array('name' => 'ph_name')); ! $this->fields['ph_phone'] =& new FT_Text($db, array('name' => 'ph_phone')); $this->fields_list[] =& $this->fields['ph_name']; $this->fields_list[] =& $this->fields['ph_phone']; --- 18,23 ---- $this->name = 'phones'; $this->fields['ph_id'] =& new FT_Text($db, array('name' => 'ph_id', 'pkey' => TRUE, 'required' => TRUE)); ! $this->fields['ph_name'] =& new FT_Text($db, array('name' => 'ph_name', 'label' => 'Name')); ! $this->fields['ph_phone'] =& new FT_Text($db, array('name' => 'ph_phone', 'label' => 'Phone')); $this->fields_list[] =& $this->fields['ph_name']; $this->fields_list[] =& $this->fields['ph_phone']; *************** *** 28,42 **** $db->Connect(); $tb =& new TB_Teste($db); ! $id = $tb->Save(array('ph_id' => '-1', 'ph_name' => 'Test 1', 'ph_phone' => '555-5551')) or print('Error(Save): '.$tb->Error()); ! echo 'Added ID:'.$id.'<br>'; ! $id = $tb->Save(array('ph_id' => '-1', 'ph_name' => 'Test 2', 'ph_phone' => '555-5552')) or print('Error(Save): '.$tb->Error()); ! echo 'Added ID:'.$id.'<br>'; ! $id = $tb->Save(array('ph_id' => '-1', 'ph_name' => 'Test 3', 'ph_phone' => '555-5553')) or print('Error(Save): '.$tb->Error()); ! echo 'Added ID:'.$id.'<br>'; ! $tb->Seek(array('ph_name' => 'Test 3'), FALSE) or print('Error(Seek): '.$tb->Error()); ! echo 'Seek ID:'.$tb->data['ph_id'].'<br>'; ! $tb->ShowList(); $tb->Delete() or print('Error(Delete): '.$tb->Error()); ! echo 'Deleted<br>'; $db->Close(); ?> --- 30,52 ---- $db->Connect(); $tb =& new TB_Teste($db); ! $id1 = $tb->Save(array('ph_id' => '-1', 'ph_name' => 'Test 1', 'ph_phone' => '555-5551')) or print('Error(Save): '.$tb->Error()); ! echo 'Added ID:'.$id1.'<br>'; ! $id2 = $tb->Save(array('ph_id' => '-1', 'ph_name' => 'Test 2', 'ph_phone' => '555-5552')) or print('Error(Save): '.$tb->Error()); ! echo 'Added ID:'.$id2.'<br>'; ! $id3 = $tb->Save(array('ph_id' => '-1', 'ph_name' => 'Test 3', 'ph_phone' => '555-5553')) or print('Error(Save): '.$tb->Error()); ! echo 'Added ID:'.$id3.'<br>'; ! $tb->ShowList('vortex_test.php?PKEY'); ! $tb->Seek(array('ph_id' => $id1), FALSE) or print('Error(Seek): '.$tb->Error()); ! echo 'Seek ID:'.$tb->data['ph_id']; $tb->Delete() or print('Error(Delete): '.$tb->Error()); ! echo '... Deleted<br>'; ! $tb->Seek(array('ph_id' => $id2), FALSE) or print('Error(Seek): '.$tb->Error()); ! echo 'Seek ID:'.$tb->data['ph_id']; ! $tb->Delete() or print('Error(Delete): '.$tb->Error()); ! echo '... Deleted<br>'; ! $tb->Seek(array('ph_id' => $id3), FALSE) or print('Error(Seek): '.$tb->Error()); ! echo 'Seek ID:'.$tb->data['ph_id']; ! $tb->Delete() or print('Error(Delete): '.$tb->Error()); ! echo '... Deleted<br>'; $db->Close(); ?> --- NEW FILE: tests.css --- .div_list table { border-collapse:collapse; width: 100%; border:1pt solid black; } .div_list table th { border-bottom: 1pt solid black; } --- NEW FILE: vortex_test.css --- #tb_phones { margin: 0 auto; width: 50%; } #tb_phones .fd_ph_name { text-align: left; background-color: #FFFFCC; } #tb_phones th.fd_ph_name { background-color: #FFFF00; } #tb_phones .fd_ph_phone { text-align: left; background-color: #EEEEFF; } #tb_phones th.fd_ph_phone { background-color: #BBBBFF; } |