$tableData[] = array('fieldName' => 'username', 'value' => $username, 'type' => 'string'); } if (!empty($_POST['password'])) { $password = hashconv($_POST['password']); $tableData[] = array('fieldName' => 'password', 'value' => $password, 'type' => 'string'); } if (!empty($_POST['status'])) { $status = intval($_POST['status']); $tableData[] = array('fieldName' => 'status', 'value' => $status, 'type' => 'integer'); } $login->update($tableData, $login_id); $msg[] = array('value' => '更新しました', 'style' => 'success'); } // 更新処理 if (isset($_POST['mode']) && $_POST['mode'] == 'delete') { $login_id = intval($_POST['user_id']); $login->delete($login_id); $msg[] = array('value' => '削除しました', 'style' => 'danger'); } $assets['msg'] = $msg; /*==================== AFTER ACTIONS ====================*/ // SMARTY出力 $smarty->assign($assets); $smarty->display($template); // エンドスクリプト require './includes/end.php'; /*==================== FUNCTIONS ====================*/