Changeset 16282
- Timestamp:
- 2007/10/05 22:47:45 (16 years ago)
- Location:
- branches/feature-module-update/data/class
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/feature-module-update/data/class/GC_SendMail.php
r16276 r16282 22 22 $name = ereg_replace(">",">", $name); 23 23 24 if( WINDOWS != true) {24 if(OS_TYPE != 'WIN') { 25 25 // windowsでは文字化けするので使用しない。 26 26 $name = mb_convert_encoding($name,"JIS",CHAR_CODE); … … 71 71 $from_name = ereg_replace(">",">", $from_name); 72 72 73 if( WINDOWS != true) {73 if(OS_TYPE != 'WIN') { 74 74 // windowsでは文字化けするので使用しない。 75 75 $from_name = mb_convert_encoding($from_name,"JIS",CHAR_CODE); -
branches/feature-module-update/data/class/SC_CheckError.php
r16153 r16282 907 907 */ 908 908 function evalCheck($value) { 909 // falseは、正当な式と評価する。 910 if($value === "false") { 911 return true; 912 } 909 913 return @eval("return " . $value . ";"); 910 914 } -
branches/feature-module-update/data/class/SC_Query.php
r15532 r16282 196 196 if(eregi("^Now\(\)$", $val)) { 197 197 $strval .= 'Now(),'; 198 // 先頭に~があるとプレースホルダーしない。 199 } else if(ereg("^~", $val)) { 200 $strval .= ereg_replace("^~", "", $val); 198 201 } else { 199 202 $strval .= '?,'; … … 266 269 if(eregi("^Now\(\)$", $val)) { 267 270 $strcol .= $key . '= Now(),'; 271 // 先頭に~があるとプレースホルダーしない。 272 } else if(ereg("^~", $val)) { 273 $strcol .= $key . "=" . ereg_replace("^~", "", $val) . ","; 268 274 } else { 269 275 $strcol .= $key . '= ?,'; -
branches/feature-module-update/data/class/db/SC_DB_MasterData.php
r16248 r16282 34 34 35 35 /** デフォルトのテーブルカラム名 */ 36 var $columns = array("id", "name", "rank" );36 var $columns = array("id", "name", "rank", "remarks"); 37 37 38 38 // }}} … … 146 146 } 147 147 return $i; 148 } 149 150 /** 151 * マスタデータを追加する. 152 * 153 * 引数 $masterData の値でマスタデータを更新する. 154 * $masterData は key => value 形式の配列である必要がある. 155 * 156 * @param string $name マスタデータ名 157 * @param string $key キー名 158 * @param string $comment コメント 159 * @param bool $autoCommit トランザクションを自動的に commit する場合 true 160 * @return integer マスタデータの更新数 161 */ 162 function insertMasterData($name, $key, $value, $comment, $autoCommit = true) { 163 164 $columns = $this->getDefaultColumnName(); 165 166 $this->objQuery = new SC_Query(); 167 if ($autoCommit) { 168 $this->objQuery->begin(); 169 } 170 171 // 指定のデータを追加 172 $sqlVal[$columns[0]] = $key; 173 $sqlVal[$columns[1]] = $value; 174 $sqlVal[$columns[2]] = $this->objQuery->max($name, $columns[2]) + 1; 175 $sqlVal[$columns[3]] = $comment; 176 $this->objQuery->insert($name, $sqlVal); 177 178 if ($autoCommit) { 179 $this->objQuery->commit(); 180 } 181 return 1; 148 182 } 149 183
Note: See TracChangeset
for help on using the changeset viewer.